Пример #1
0
 public static int sua_PMT(PhieuMuonTra a)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@sopmt", a.SoPMT),
         new SqlParameter("@ngaylappmt", a.NgayLap),
         new SqlParameter("@ngayhtra", a.NgayHTra),
         new SqlParameter("@ngaytra", (DateTime.Compare(a.NgayTra, a.NgayLap) != 0)?a.NgayTra:(object)DBNull.Value),
         new SqlParameter("@madg", a.MaDG),
         new SqlParameter("@matt", a.MaTT),
     };
     return(DataProvider.ExecuteNonQuery("sua_PMT", para));
 }
Пример #2
0
 public static int them_PMT(PhieuMuonTra a)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@sopmt", a.SoPMT),
         new SqlParameter("@ngaylappmt", a.NgayLap),
         new SqlParameter("@ngayhtra", a.NgayHTra),
         new SqlParameter("@ngaytra", DBNull.Value),
         new SqlParameter("@madg", a.MaDG),
         new SqlParameter("@matt", a.MaTT),
     };
     return(DataProvider.ExecuteNonQuery("them_PMT", para));
 }
Пример #3
0
 public bool Them(PhieuMuonTra pm)
 {
     try
     {
         string query = @"INSERT INTO PHIEUMUONTRA(MAPHIEU,MASV ,MANV ,NGAYMUON)
                         VALUES ( '" + pm.MaPhieu + "','" + pm.MaSV + "','" + pm.MaNV + "', '" + pm.NgayMuon + "')";
         OpenConection();
         ExecuteQueries(query);
         CloseConnection();
         return(true);
     }
     catch (Exception ex)
     {
         SetEx(ex);
         return(false);
     }
 }
Пример #4
0
 public static int sua_PMT(PhieuMuonTra a)
 {
     return(DAO.sua_PMT(a));
 }
Пример #5
0
 public static int them_PMT(PhieuMuonTra a)
 {
     return(DAO.them_PMT(a));
 }