Beispiel #1
0
 public frm_CapNhapQD2()
 {
     InitializeComponent();
     qdBUS          = new QuyDinh2_BUS();
     qdDTO          = new QuyDinh2_DTO();
     kiemTra        = true;
     XacNhanCapNhap = false;
 }
Beispiel #2
0
 public bool KiemTra(QuyDinh2_DTO qd)
 {
     if (qd.HanNhanSach > 0 && qd.SoTheLoai > 0)
     {
         return(true);
     }
     return(false);
 }
Beispiel #3
0
 public bool Update(QuyDinh2_DTO qd)
 {
     try
     {
         if (con.State == ConnectionState.Closed)
         {
             con.Open();
         }
         string     sqlQuery = "Update QUYDINH2 set SoTheLoai = " + qd.SoTheLoai + ",HanThoiGianNhanSach = " + qd.HanNhanSach + " Where ID = 1";
         SqlCommand cmd      = new SqlCommand(sqlQuery, con);
         cmd.ExecuteNonQuery();
         con.Close();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Beispiel #4
0
 public bool Update(QuyDinh2_DTO qd)
 {
     return(qdDAL.Update(qd));
 }