Exemplo n.º 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");
     }
 }
Exemplo n.º 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) ");
     }
 }
Exemplo n.º 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. ");
            }
        }
Exemplo n.º 4
0
 partial void Deletecodesharp(codesharp instance);
Exemplo n.º 5
0
 partial void Updatecodesharp(codesharp instance);
Exemplo n.º 6
0
 partial void Insertcodesharp(codesharp instance);