private void tbs_delete_Click(object sender, EventArgs e) { if (cbbmanv.Text == "") { MessageBox.Show("Chưa chọn thông tin"); return; } kyluat kl = new kyluat(); kl.manv = cbbmanv.SelectedValue.ToString(); kl.hinhthuc = txthinhthuc.Text; kl.lydo = txtlydo.Text; kl.ngaykl = datengaykl.Value; if (MessageBox.Show(string.Format("Xóa Kỷ luật"), "", MessageBoxButtons.OKCancel) == DialogResult.OK) { if (Bus.DeleteProfile(kl) > 0) { MessageBox.Show("Đã xóa"); Kyluat_Load(sender, e); } else { MessageBox.Show("thông tin chưa đc xóa"); } } }
public static int DeleteProfile(kyluat kl) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@manv", kl.manv), }; return(DataProvider.ExcuteNonQuerry("xoakl", para)); }
public static int UpdateProfile(kyluat kl) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@manv", kl.manv), new SqlParameter("@ngaykl", kl.ngaykl), new SqlParameter("@hinhthuc", kl.hinhthuc), new SqlParameter("@lydo", kl.lydo), }; return(DataProvider.ExcuteNonQuerry("suakl", para)); }
public static int DeleteProfile(kyluat kl) { return(Dao.DeleteProfile(kl)); }
public static int UpdateProfile(kyluat kl) { return(Dao.UpdateProfile(kl)); }
public static int InsertProfile(kyluat kl) { return(Dao.InsertProfile(kl)); }