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)); }
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)); }
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); } }
public static int sua_PMT(PhieuMuonTra a) { return(DAO.sua_PMT(a)); }
public static int them_PMT(PhieuMuonTra a) { return(DAO.them_PMT(a)); }