Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/uy/public_html/wp-includes/functions.php on line 6114
C# arşivleri – Umut Yazılım - Ümit AYDIN

Kategori: C#

Umut Yazılım - Logo Ürünlerinde ve Yazılımda 20 yıllık tecrübe..

Grid koşullu biçimlendirme

Devexpress gridcontrol koşullu biçimlendirme aşağıdaki gibi yapılmaktadır. private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e){GridView View = sender as GridView;if (e.RowHandle >= 0){// string Kategori = View.GetRowCellDisplayText(e.RowHandle, View.Columns[1]); // kolon indexi ilestring gidervarmi = View.GetRowCellDisplayText(e.RowHandle, View.Columns[“GIDERVARMI”]); // Kolon adı ile if (gidervarmi !=””){e.Appearance.BackColor = Color.Green;e.Appearance.ForeColor = Color.White;//e.Appearance.BackColor2 = Color.Green;// sadece BackColor ‘e renk verirseniz satır tek renk…
Devamı

C# buton click event çağırma

Aşağıdaki kod ile butona ait click olayı tetiklenir. btngetir_Click(sender, e);

Gridcontrol hangi satır seçili ise form kapanınca aynı satır üzerinde konumlanma.

int row1 = gridView1.LocateByValue(“SIPARIS_NO”, sipno, null);gridView1.FocusedRowHandle = row1;

Gridcontrol Son satıra konumlanma

Aşağıdaki kod ile form açıldığında en son satıra konumlandırma yapılabilir. gridView1.FocusedRowHandle = (gridView1.DataRowCount – 1);

Devexpress Gridview Satırları Silme

Aşağıdaki kod ile gridview e ait bütün satırları kolonları silmeden boşaltabilirsiniz. while (gridView1.RowCount != 0){gridView1.SelectAll();gridView1.DeleteSelectedRows();}

C# sql class da parametre kullanımı

C# sql veritabanı işlemlerinde db class a sql parametreli gönderme örneği.

C# Dosya Kopyalama

C# kodlarında dosya koplayama işlemidir. Ayrıca System.Diagnostics.Process.Start Methodu ile kopyalanan dosyayı açabiliriz.

Kayıt Silinme onayı

if (XtraMessageBox.Show(“Kayıt Silinecektir Eminmisiniz??”, “Bilgilendirme”, MessageBoxButtons.YesNo) != DialogResult.No){int secilenId = int.Parse(gridView1.GetFocusedRowCellValue(“FATID”).ToString());MySqlClass.SqlExecute(“delete from SATISLAR WHERE ID=” + secilenId + “”, “local”);}

C# CheckedListBox İşlemleri

SqlClass.dsGenel = SqlClass.GetDataset(“SELECT ID,ADI FROM [dbo].[CARI_GRUBU]”, “CARI_GRUBU”, “local”);for (int i = 0; i < SqlClass.dsGenel.Tables[“CARI_GRUBU”].Rows.Count; i++){this.chcgrubu.Items.Add(SqlClass.dsGenel.Tables[“CARI_GRUBU”].Rows[i][“ADI”].ToString());} string sqlCumle = “SELECT [CARIID] ,[CARITUR] FROM [CRM].[dbo].[CARI_KATEGORI] where TRCODE=1 AND CARIID=” + id + “”;DataTable dt = SqlClass.GetDataTable(sqlCumle, “local”);foreach (DataRow dr in dt.Rows){string gelen = dr[1].ToString();for (int i = 0; i < chcgrubu.Items.Count; i++){if (chcgrubu.Items[i].ToString() == gelen.ToString()){chcgrubu.SetItemChecked(i, true);}}}