Exemplo n.º 1
0
 private void autonumber()
 {
     using (DataClassesDataContext db = new DataClassesDataContext())
     {
         Msmember m = db.Msmembers.OrderByDescending(s => s.MemberID).FirstOrDefault();
         if (m != null)
         {
             string a = m.MemberID.ToString();
             int    n = Convert.ToInt32(a) + 1;
             tbxID.Text = n.ToString("d1");
         }
         else
         {
             tbxID.Text = "1";
         }
     }
 }
Exemplo n.º 2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     using (DataClassesDataContext db = new DataClassesDataContext())
     {
         if (tbxID.Text == "" || tbxName.Text == "" || tbxEmail.Text == "" || tbxHandphone.Text == "")
         {
             MessageBox.Show("Data Cant Be Empty", "Information", MessageBoxButtons.OK, MessageBoxIcon.Error);
             bersih();
         }
         else
         {
             Msmember m = db.Msmembers.Where(s => s.MemberID == tbxID.Text).FirstOrDefault();
             db.Msmembers.DeleteOnSubmit(m);
             db.SubmitChanges();
             awal();
             MessageBox.Show("Successfully Deleted Data", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Exemplo n.º 3
0
 partial void DeleteMsmember(Msmember instance);
Exemplo n.º 4
0
 partial void UpdateMsmember(Msmember instance);
Exemplo n.º 5
0
 partial void InsertMsmember(Msmember instance);