private void tbs_edit_Click(object sender, EventArgs e) { if (txtpbcu.Text == "") { MessageBox.Show("Chưa chọn thông tin"); return; } dieuchuyencongtac dcct = new dieuchuyencongtac(); dcct.manv = cbbmanv.Text; dcct.tennv = txttennv.Text; dcct.mapbcu = txtpbcu.Text; dcct.mapbmoi = cbbpbmoi.SelectedValue.ToString(); dcct.macvcu = txtcvcu.Text; dcct.macvmoi = cbbcvmoi.SelectedValue.ToString(); dcct.tungay = datetungay.Value; dcct.lydo = txtlydo.Text; dcct.ghichu = txtlydo.Text; if (MessageBox.Show(string.Format("Sửa Điều chuyển công tác"), "", MessageBoxButtons.OKCancel) == DialogResult.OK) { if (Bus.UpdateProfile(dcct) > 0) { MessageBox.Show("Đã sửa"); Dieuchuyencongtac_Load(sender, e); } else { MessageBox.Show("Thông tin chưa đc sửa"); } } }
public static int DeleteProfile(dieuchuyencongtac dcct) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@mapbcu", dcct.mapbcu), new SqlParameter("@tungay", dcct.tungay), }; return(DataProvider.ExcuteNonQuerry("xoadcct", para)); }
public static int UpdateProfile(dieuchuyencongtac dcct) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@tungay", dcct.tungay), new SqlParameter("@lydo", dcct.lydo), new SqlParameter("@ghichu", dcct.ghichu), }; return(DataProvider.ExcuteNonQuerry("suadcct", para)); }
public static int InsertProfile(dieuchuyencongtac dcct) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@manv", dcct.manv), new SqlParameter("@tennv", dcct.tennv), new SqlParameter("@mapbcu", dcct.mapbcu), new SqlParameter("@mapbmoi", dcct.mapbmoi), new SqlParameter("@macvcu", dcct.macvcu), new SqlParameter("@macvmoi", dcct.macvmoi), new SqlParameter("@tungay", dcct.tungay), new SqlParameter("@lydo", dcct.lydo), new SqlParameter("@ghichu", dcct.ghichu), }; return(DataProvider.ExcuteNonQuerry("themdcct", para)); }
public static int DeleteProfile(dieuchuyencongtac dcct) { return(Dao.DeleteProfile(dcct)); }
public static int UpdateProfile(dieuchuyencongtac dcct) { return(Dao.UpdateProfile(dcct)); }
public static int InsertProfile(dieuchuyencongtac dcct) { return(Dao.InsertProfile(dcct)); }