private void tbs_edit_Click(object sender, EventArgs e) { if (cbbmanv.Text == "") { MessageBox.Show("Chưa chọn thông tin"); return; } luong l = new luong(); l.manv = cbbmanv.Text; l.tennv = txttennv.Text; l.macv = cbbmacv.Text; l.hesoluong = int.Parse(txthesoluong.Text.ToString()); l.phucapcv = int.Parse(txtphucapcv.Text.ToString()); l.luongcoban = int.Parse(txtluongcoban.Text.ToString()); l.tienthuong = int.Parse(txttienthuong.Text.ToString()); l.tienphat = int.Parse(txttienphat.Text.ToString()); l.tienbaohiemyte = int.Parse(txttienBHYT.Text.ToString()); l.tienbaohiemxahoi = int.Parse(txttienBHXH.Text.ToString()); l.tongluong = int.Parse(txttongluong.Text.ToString()); if (MessageBox.Show(string.Format("Sửa lương"), "", MessageBoxButtons.OKCancel) == DialogResult.OK) { if (Bus.UpdateProfile(l) > 0) { MessageBox.Show("Đã sửa"); Luong_Load(sender, e); } else { MessageBox.Show("Thông tin chưa đc sửa"); } } }
public static int DeleteProfile(luong l) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@manv", l.manv), }; return(DataProvider.ExcuteNonQuerry("xoaluong", para)); }
public ActionResult CapNhat() { var dinhmuc = Request.Form["dinhmuc"]; var query = from b in db.luong where b.id == 1 select b; luong a = query.FirstOrDefault <luong>(); if (a != null) { a.dinhmuc = Int32.Parse(dinhmuc); db.SaveChanges(); } return(Redirect("/DinhMuc")); }
public static int UpdateProfile(luong l) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@manv", l.manv), new SqlParameter("@tennv", l.tennv), new SqlParameter("@macv", l.macv), new SqlParameter("@luongcoban", l.luongcoban), new SqlParameter("@hesoluong", l.hesoluong), new SqlParameter("@phucapcv", l.phucapcv), new SqlParameter("@tienthuong", l.tienthuong), new SqlParameter("@tienphat", l.tienphat), new SqlParameter("@tienbaohiemyte", l.tienbaohiemyte), new SqlParameter("@tienbaohiemxahoi", l.tienbaohiemxahoi), new SqlParameter("@tongluong", l.tongluong), }; return(DataProvider.ExcuteNonQuerry("sualuong", para)); }
public static int DeleteProfile(luong l) { return(Dao.DeleteProfile(l)); }
public static int UpdateProfile(luong l) { return(Dao.UpdateProfile(l)); }
public static int InsertProfile(luong l) { return(Dao.InsertProfile(l)); }