public static int delete(string returnid) { string sql = string.Format("delete from phieutra where maphieutra = '{0}'", returnid); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static DataTable findWithBookID(String bookid) { string sql = String.Format("select * from phieumuon where masach = '{0}'", bookid); var result = ProcessData.ExcuteQuery(sql); return(result); }
public static DataTable findWithReturnID(String returnid) { string sql = String.Format("select * from phieutra where maphieutra = '{0}'", returnid); var result = ProcessData.ExcuteQuery(sql); return(result); }
public static DataTable findWithReaderID(String readerid) { string sql = String.Format("select * from phieumuon where madocgia = '{0}'", readerid); var result = ProcessData.ExcuteQuery(sql); return(result); }
public static DataTable readAll() { string sql = "select * from docgia"; var result = ProcessData.ExcuteQuery(sql); return(result); }
public static int delete(string borrowid) { string sql = string.Format("delete from phieumuon where maphieumuon = '{0}'", borrowid); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static String getPosition(int pos) { string sql = string.Format("select v.pos from vitri v where id = '{0}'", pos); var result = ProcessData.ExcuteScalar(sql); return((String)result); }
public static int update(BorrowDTO borrow) { string sql = string.Format("update phieumuon set madocgia = '{0}', masach = '{1}', ngaymuon = '{2}', hantra = '{3}' where maphieumuon = '{4}'", borrow.ReaderID, borrow.BookID, borrow.BorrowedDate, borrow.ReturnDate, borrow.BorrowID); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static int update(ReturnDTO returns) { string sql = string.Format("update phieutra set madocgia = '{0}', masach = '{1}', ngaymuon = '{2}', tienphat = '{3}' where maphieumuon = '{4}'", returns.Readerid, returns.Bookid, returns.RtnDate, returns.Forfeit, returns.Returnid); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static int insert(BookDTO book) { string sql = string.Format("insert into sach(masach, tensach, tacgia, nsx, nxb, ngaynhap, gia, nvtiepnhan, loai) values" + " ('{0}', N'{1}', N'{2}', '{3}', N'{4}', '{5}', '{6}', '{7}', '{8}')", book.BookID, book.Title, book.Author, book.PublishedYear, book.Publisher, book.Receipt, book.Price, book.StockkeeperID, book.Type); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static int insert(BorrowDTO borrow) { string sql = string.Format("insert into phieumuon values" + "('{0}', '{1}', '{2}', '{3}', '{4}')", borrow.BorrowID, borrow.ReaderID, borrow.BookID, borrow.BorrowedDate, borrow.ReturnDate); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static int insert(ReturnDTO returns) { string sql = string.Format("insert into phieutra values" + "('{0}', '{1}', '{2}', '{3}', '{4}')", returns.Returnid, returns.Readerid, returns.Bookid, returns.RtnDate, returns.Forfeit); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static int update(BookDTO book) { string sql = string.Format("update sach set tensach = N'{1}',tacgia = N'{2}', nsx = '{3}', nxb = '{4}', ngaynhap = '{5}', " + "gia = '{6}', nvtiepnhan = '{7}', loai = '{8}' where masach = '{0}'", book.BookID, book.Title, book.Author, book.PublishedYear, book.Publisher, book.Receipt, book.Price, book.StockkeeperID, book.Type); var result = ProcessData.ExcuteNonQuery(sql); return(result); }
public static void delete(string madocgia) { string sql = string.Format("delete from docgia where madocgia ='{0}' ", madocgia); var result = ProcessData.ExcuteNonQuery(sql); }
public static void update(ReaderDTO reader) { string sql = string.Format("update docgia set hoten=N'{1}', diachi=N'{2}',sdt='{3}', cmnd='{5}', dob='{4}', email='{6}', ngaylapthe='{7}', nvlapthe='{8}', username='******', password='******' where madocgia='{0}'", reader.MaNV, reader.HoTen, reader.DiaChi, reader.SDT, reader.DOB, reader.CMND, reader.Email, reader.NLT, reader.NVLapThe, reader.UserName, reader.Password); var result = ProcessData.ExcuteNonQuery(sql); }
public static void insert(ReaderDTO reader) { string sql = string.Format("insert into docgia values ('{0}', N'{1}', N'{2}','{3}','{4}', '{5}', '{6}', '{7}', '{8}', N'{9}', '{10}')", reader.MaNV, reader.HoTen, reader.DiaChi, reader.SDT, reader.DOB, reader.CMND, reader.Email, reader.NLT, reader.NVLapThe, reader.UserName, reader.Password); var result = ProcessData.ExcuteNonQuery(sql); }
public static void delete(string manv) { string sql = string.Format("delete from banquanli where manv ='{0}' ", manv); var result = ProcessData.ExcuteNonQuery(sql); }
public static void update(AdministratorDTO admin) { string sql = string.Format("update banquanli set hoten=N'{1}', diachi=N'{2}',sdt='{3}', cmnd='{5}', dob='{4}', email='{6}', ngaylapthe='{7}', nvlapthe='{8}', bangcap='N{9}', chucvu='{10}', username='******', password='******'where manv='{0}'", admin.MaNV, admin.HoTen, admin.DiaChi, admin.SDT, admin.DOB, admin.CMND, admin.Email, admin.NLT, admin.NVLapThe, admin.BangCap, admin.ChucVu, admin.UserName, admin.Password); var result = ProcessData.ExcuteNonQuery(sql); }
public static void insert(AdministratorDTO admin) { string sql = string.Format("insert into banquanli values ('{0}', N'{1}', N'{2}','{3}','{4}', '{5}', '{6}', '{7}', '{8}', N'{9}', '{10}', '{11}', '{12}')", admin.MaNV, admin.HoTen, admin.DiaChi, admin.SDT, admin.DOB, admin.CMND, admin.Email, admin.NLT, admin.NVLapThe, admin.BangCap, admin.ChucVu, admin.UserName, admin.Password); var result = ProcessData.ExcuteNonQuery(sql); }