private void Btndelete_Click(object sender, EventArgs e) { msmember member = new msmember(); member = db.msmembers.Single(x => x.memberid == Convert.ToInt32(txtid.Text)); db.msmembers.DeleteOnSubmit(member); db.SubmitChanges(); load(); }
private void Btnupdate_Click(object sender, EventArgs e) { msmember member = new msmember(); member = db.msmembers.Single(x => x.memberid == Convert.ToInt32(txtid.Text)); member.name = txtname.Text; member.email = txtemail.Text; member.handphone = txthandphone.Text; db.SubmitChanges(); load(); }
private void Btninsert_Click(object sender, EventArgs e) { msmember member = new msmember(); member.name = txtname.Text; member.email = txtemail.Text; member.handphone = txthandphone.Text.ToString(); member.joindate = dateTimePicker1.Value; db.msmembers.InsertOnSubmit(member); db.SubmitChanges(); load(); }
partial void Deletemsmember(msmember instance);
partial void Updatemsmember(msmember instance);
partial void Insertmsmember(msmember instance);