Exemplo n.º 1
0
        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");
                }
            }
        }
Exemplo n.º 2
0
 public static int DeleteProfile(luong l)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@manv", l.manv),
     };
     return(DataProvider.ExcuteNonQuerry("xoaluong", para));
 }
Exemplo n.º 3
0
        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"));
        }
Exemplo n.º 4
0
 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));
 }
Exemplo n.º 5
0
 public static int DeleteProfile(luong l)
 {
     return(Dao.DeleteProfile(l));
 }
Exemplo n.º 6
0
 public static int UpdateProfile(luong l)
 {
     return(Dao.UpdateProfile(l));
 }
Exemplo n.º 7
0
 public static int InsertProfile(luong l)
 {
     return(Dao.InsertProfile(l));
 }