Пример #1
0
 private void btnSil_Click(object sender, EventArgs e)
 {
     try
     {
         int       idd = int.Parse(dgv.SelectedRows[0].Cells[4].Value.ToString());
         codesharp cod = db.codesharps.First(d => d.id == idd);
         db.codesharps.DeleteOnSubmit(cod);
         db.SubmitChanges();
         db.Refresh(RefreshMode.OverwriteCurrentValues, db.codesharps);
         fill();
     }
     catch
     {
         MessageBox.Show("NO DATA");
     }
 }
Пример #2
0
 private void btngunce_Click(object sender, EventArgs e)
 {
     if (rtxtacdeg.Text != "" && rtxtaddeg.Text != "" && rtxtkoddeg.Text != "")
     {
         codesharp cod = db.codesharps.First(d => d.id == frmMain.ids);
         cod.name  = rtxtaddeg.Text;
         cod.text  = rtxtkoddeg.Text;
         cod.descr = rtxtacdeg.Text;
         cod.lang  = rtxtlandeg.Text;
         cod.pack  = rtxtpackdeg.Text;
         db.SubmitChanges();
         MessageBox.Show("Güncellendi"); this.Close();
     }
     else
     {
         MessageBox.Show("Güncellenmendi.(Boş alan bırakmayınız) ");
     }
 }
Пример #3
0
        private void btnbitir_Click(object sender, EventArgs e)
        {
            if (rtxtacgir.Text != "" && rtxtadgir.Text != "" && rtxtkodgir.Text != "" && rtxtdilgir.Text != "")
            {
                codesharp cod = new codesharp()
                {
                    name  = rtxtadgir.Text,
                    descr = rtxtacgir.Text,
                    text  = rtxtkodgir.Text,
                    lang  = rtxtdilgir.Text,
                    pack  = rtxtpackgir.Text
                };
                db.codesharps.InsertOnSubmit(cod);
                db.SubmitChanges();
                MessageBox.Show("Eklendi"); this.Close();
            }

            else
            {
                MessageBox.Show("Boş alan bırakmayınız. ");
            }
        }
Пример #4
0
 partial void Deletecodesharp(codesharp instance);
Пример #5
0
 partial void Updatecodesharp(codesharp instance);
Пример #6
0
 partial void Insertcodesharp(codesharp instance);