label1.Text = ""; OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dosya_adi\veritabani_ismi.Mdb;Persist Security Info=False;"); OleDbDataAdapter da1 = new OleDbDataAdapter("SELECT * FROM Tablo ;", con); DataTable tablo1 = new DataTable(); da1.Fill(tablo1); label1.Text = tablo1.Rows.Count.ToString(); dataGridView1.DataSource = tablo1; con.Close();
using System.Threading.Tasks;
var tasks = new[] { Task.Run(() => { Label1.Text = islem1(); }), Task.Run(() => { Label2.Text = islem2(); }) }; Task.WaitAll(tasks);
yada,
var tasks = new[] { Task.Factory.StartNew(() => { Label1.Text = islem1(); }), Task.Factory.StartNew(() => { Label2.Text = islem2(); }) }; Task.WaitAll(tasks);
public static bool PingTest(string ip) { try {
int timeout_sure = 3000; //ms cinsinden Ping ping = new Ping(); PingReply pingReply = ping.Send(ip, timeout_sure); if (pingReply.Status == IPStatus.Success) { return true; } else { return false; } } catch (Exception) { return false; } }
SELECT tarih,YEAR(tarih) AS YIL,MONTH(tarih) AS AY,DAY(tarih) AS GUN,datepart(HOUR,tarih) AS SAAT,datepart(MINUTE,tarih) AS DAKIKA,datepart(SECOND,tarih) AS SANIYE FROM TABLO_ADI
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), "alert('mesaj');", true);
zamanlama ayarını 5 dakikada 1 yapma crontab kodu:
sudo crontab -e giriş yaparak gelen sayfanın sonuna
*/5 * * * * /home/pi/Desktop/gorev/calisacak_dosya.sh
kaydedin.
public static bool TcpSocketTest(string ip, int port) { try { System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient(); if (client.ConnectAsync(ip, port).Wait(5)) { return true; } else { return false; } } catch (System.Exception ex) { return false; } }
function CheckBoxList_guncelle() { var veri = "WINDOWS 10 64,SQL SERVER"; $("[id*=CheckBoxList2] input:checkbox").prop('checked', false); var kayitt = veri.split(','); var chk = document.getElementById("CheckBoxList2"); var checkboxes = chk.getElementsByTagName("INPUT"); for (var i = 0; i < kayitt.length; i++) { for (var ix = 0; ix < checkboxes.length; ix++) { if (checkboxes[ix].value == kayitt[i]) { $("[id*=CheckBoxList2] input:checkbox").eq(ix).prop('checked', true); break; } } } }
DataTable table1 = new DataTable();
using (SqlDataAdapter sorgu1 = new SqlDataAdapter("SELECT * FROM table_name;", new SqlConnection(Connection_Adress(""))))
{
sorgu1.Fill(table1);
}
© 2025 - ÖMER YILMAZ KİŞİSEL WEB SAYFASI