private void BtnHapus_Click(object sender, EventArgs e) { if (txtnama.Text != "" && txtemail.Text != "" && txthandphone.Text != "" && txtPic.Text != "") { member memm = new member(); memm = db.members.Single(x => x.nis == ID); db.members.DeleteOnSubmit(memm); db.SubmitChanges(); loadManMember(); } else { inputValidation(); } }
private void BtnEdit_Click(object sender, EventArgs e) { if (txtnama.Text != "" && txtemail.Text != "" && txthandphone.Text != "" && txtPic.Text != "") { member memm = new member(); memm = db.members.Single(x => x.nis == ID); memm.nama = txtnama.Text; memm.email = txtemail.Text; memm.handphone = txthandphone.Text; memm.joindate = Convert.ToDateTime(getDate()); memm.pohoto = txtPic.Text; db.SubmitChanges(); loadManMember(); } else { inputValidation(); } }
partial void Deletemember(member instance);
partial void Updatemember(member instance);
partial void Insertmember(member instance);