예제 #1
0
        private void tbs_save_Click(object sender, EventArgs e)
        {
            if (cbbmanv.Text == "")
            {
                MessageBox.Show("Chưa chọn thông tin");
                return;
            }
            khenthuong kt = new khenthuong();

            kt.manv = cbbmanv.SelectedValue.ToString();

            kt.hinhthuc = txthinhthuc.Text;
            kt.lydo     = txtlydo.Text;
            kt.ngaykt   = datengaykt.Value;
            if (MessageBox.Show(string.Format("Thêm khen thưởng"), "", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                if (Bus.InsertProfile(kt) > 0)
                {
                    MessageBox.Show("Đã thêm");
                    Khenthuong_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("Mã kkhen thưởng đã tồn tại");
                }
            }
        }
예제 #2
0
파일: Dao.cs 프로젝트: phuongthuy218/Nhansu
 public static int DeleteProfile(khenthuong kt)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@manv", kt.manv),
     };
     return(DataProvider.ExcuteNonQuerry("xoakt", para));
 }
예제 #3
0
파일: Dao.cs 프로젝트: phuongthuy218/Nhansu
 public static int UpdateProfile(khenthuong kt)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@manv", kt.manv),
         new SqlParameter("@ngaykt", kt.ngaykt),
         new SqlParameter("@hinhthuc", kt.hinhthuc),
         new SqlParameter("@lydo", kt.lydo),
     };
     return(DataProvider.ExcuteNonQuerry("suakt", para));
 }
예제 #4
0
 public static int DeleteProfile(khenthuong kt)
 {
     return(Dao.DeleteProfile(kt));
 }
예제 #5
0
 public static int UpdateProfile(khenthuong kt)
 {
     return(Dao.UpdateProfile(kt));
 }
예제 #6
0
 public static int InsertProfile(khenthuong kt)
 {
     return(Dao.InsertProfile(kt));
 }