public static int InsertNewRoomReservation(DateTime ArrivalDate, int CustomerID, string Username, int DownPayment = 0, string Note = null) { string query = "QLKS_InsertNewRoomReservation @ArrivalDate , @CustomerID , @Username , @DownPayment , @Note"; return(ExecuteQuery.ExecuteNoneQuery(query, new object[] { ArrivalDate, CustomerID, Username, DownPayment, Note })); }
public static int AddNewStaff(string name, string user, string pass, DateTime birthday, bool sex, string addr, string phone, string idNo, bool position, DateTime startDate, int salary, string note) { string EncryptPass = Account.Encrypt(pass); return(ExecuteQuery.ExecuteNoneQuery("QLKS_AddNewStaff @Name , @Username , @Password , @Birthday , @Sex , @Addr , @PhoneNumber , @IdentityNumber , @Position , @StartingDate , @Salary , @Note", new object[] { name, user, EncryptPass, birthday, sex, addr, phone, idNo, position, startDate, salary, note })); }
public static bool Login(string Username, string Password) { string EncryptedPass = Encrypt(Password); DataTable data = ExecuteQuery.ExecuteReader("QLKS_SearchAccount @Username , @Password", new object[] { Username, EncryptedPass }); return(data.Rows.Count == 1); }
public static int InsertRoomReservationDetail(int RoomReservationID, int RoomID) { string query = "QLKS_InsertRoomReservationDetail @RoomReservationID , @RoomID"; return(ExecuteQuery.ExecuteNoneQuery(query, new object[] { RoomReservationID, RoomID })); }
public static int InsertNewCustomer(string Name, DateTime Birthday, string IdeNum, string Passport, string Addr, string Phone, Sex sex) { string query = "QLKS_InsertNewCustomer @Name , @Birthday , @IdentityNumber , @Passport , @Addr , @PhoneNumber , @Sex"; return(ExecuteQuery.ExecuteNoneQuery(query, new object[] { Name, Birthday, IdeNum, Passport, Addr, Phone, sex })); }
public static int ChangeReservationInfo(int RoomID, string Name, DateTime Birthday, string Phone, Sex sex, string IdeNum, string Passport, string Addr, DateTime ArrivalDate, string Note = null) { string query = "QLKS_ChangeReservationInfo @RoomID , @Name , @Birthday , @Phone , @Sex , @IdeNum , @Passport , @Addr , @Note , @ArrivalDate"; return(ExecuteQuery.ExecuteNoneQuery(query, new object[] { RoomID, Name, Birthday, Phone, sex, IdeNum, Passport, Addr, Note, ArrivalDate })); }
public static int ChangePassword(string Username, string oldPass, string newPass) { string EncryptedOldPass = Encrypt(oldPass); string EncryptedNewPass = Encrypt(newPass); return(ExecuteQuery.ExecuteNoneQuery("QLKS_ChangePassword @Username , @OldPassword , @NewPassword", new object[] { Username, EncryptedOldPass, EncryptedNewPass })); }
public static DataTable GetRoomIdOfNewRoom() { return(ExecuteQuery.ExecuteReader("QLKS_GetRoomIdOfNewRoom")); }
public static DataTable GetAllStaffInfo(int sortIndex) { return(ExecuteQuery.ExecuteReader("QLKS_GetAllStaffInfo @Sort", new object[] { sortIndex })); }
public static DataTable GetAllServicesBillOnlyInfo(DateTime FromDate, DateTime ToDate, int staffID, int sort) { return(ExecuteQuery.ExecuteReader("QLKS_GetAllServicesBillOnlyInfo @FromDate , @ToDate , @StaffID , @Sort", new object[] { FromDate, ToDate, staffID, sort })); }
public static int AddNewRoom(RoomType roomType, int area) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_AddNewRoom @RoomTypeID , @Area", new object[] { roomType, area })); }
public static int SetRoomReservationStatus(int BillID, int RoomReservation, int RoomID) { string Query = "QLKS_SetRoomReservationStatus @BillID , @RoomeReservationID , @RoomID"; return(ExecuteQuery.ExecuteNoneQuery(Query, new object[] { BillID, RoomReservation, RoomID })); }
public static DataTable GetData(int BillID) { return(ExecuteQuery.ExecuteReader("QLKS_GetAdditionalInfoForBillViewing @BillID", new object[] { BillID })); }
public static DataTable GetBillInfoOfCustomer(int customerID) { return(ExecuteQuery.ExecuteReader("QLKS_GetBillInfoOfCustomer @CustomerID", new object[] { customerID })); }
public static DataTable GetRoomInfo(int IDRoom) { return(ExecuteQuery.ExecuteReader("QLKS_GetRoomInfo @ID", new object[] { IDRoom })); }
public static DataTable GetAllCustomer(int sort) { return(ExecuteQuery.ExecuteReader("QLKS_GetAllCustomer @Sort", new object[] { sort })); }
public static int RemoveStaff(int ID) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_RemoveStaff @StaffID", new object[] { ID })); }
public static int SetStaffInfo(int ID, string name, DateTime birthday, bool sex, string addr, string phone, string idNo, bool position, DateTime startDate, int salary, string note) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_SetStaffInfo @ID , @Password , @Birthday , @Sex , @Addr , @PhoneNumber , @IdentityNumber , @Position , @StartingDate , @Salary , @Note", new object[] { ID, name, birthday, sex, addr, phone, idNo, position, startDate, salary, note })); }
public static DataTable GetStaffInfor(string Username) { return(ExecuteQuery.ExecuteReader("QLKS_GetStaffInfo @Username", new object[] { Username })); }
public static int Payment(int BillID, int RoomReservation, int RoomID, string Username) { string Query = "QLKS_Payment @BillID , @RoomeReservationID , @RoomID , @Username"; return(ExecuteQuery.ExecuteNoneQuery(Query, new object[] { BillID, RoomReservation, RoomID, Username })); }
public static int SetServiceInfo(int id, string name, int price) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_SetServiceInfo @ID , @Name , @Price", new object[] { id, name, price })); }
public static DataTable GetStaffIdOfNewStaff() { return(ExecuteQuery.ExecuteReader("QLKS_GetStaffIdOfNewStaff")); }
public static int AddNewService(ServiceType serviceTypeID, string name, int price) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_AddNewService @ServiceTypeID , @Name , @Price", new object[] { serviceTypeID, name, price })); }
public static DataTable GetServiceIdOfNewService() { return(ExecuteQuery.ExecuteReader("QLKS_GetServiceIdOfNewService")); }
public static int InsertNewBill(int RoomReservationID, string Username) { string Query = "QLKS_InsertNewBill @RoomReservationID , @Username"; return(ExecuteQuery.ExecuteNoneQuery(Query, new object[] { RoomReservationID, Username })); }
public static int RemoveService(int id) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_RemoveService @ID", new object[] { id })); }
public static DataTable GetCustomerInfo(int RoomID) { ///return Name, birthday, PhoneNumber, Sex, IdentityNumber, Passport, Addr, Note, ArrivalDate return(ExecuteQuery.ExecuteReader("QLKS_GetCustomerInfo @ID", new object[] { RoomID })); }
public static DataTable GetLaudryServiceRevenue(int RevenueType, DateTime FromDate, DateTime ToDate) { return(ExecuteQuery.ExecuteReader("QLKS_GetLaudryServiceRevenue @RevenueType , @FromDate , @ToDate", new object[] { RevenueType, FromDate, ToDate })); }
public static DataTable GetBillDetailInfo(int BillID, int RoomReservation, int RoomID) { string Query = "QLKS_GetBillDetailInfo @BillID , @RoomeReservationID , @RoomID"; return(ExecuteQuery.ExecuteReader(Query, new object[] { BillID, RoomReservation, RoomID })); }
public static int SetRoomStatus(int RoomID, RoomStatus status) { return(ExecuteQuery.ExecuteNoneQuery("QLKS_SetRoomStatus @ID , @Status_", new object[] { RoomID, status })); }