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