예제 #1
0
        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 }));
        }
예제 #2
0
        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 }));
        }
예제 #3
0
        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);
        }
예제 #4
0
        public static int InsertRoomReservationDetail(int RoomReservationID, int RoomID)
        {
            string query = "QLKS_InsertRoomReservationDetail @RoomReservationID , @RoomID";

            return(ExecuteQuery.ExecuteNoneQuery(query,
                                                 new object[] { RoomReservationID, RoomID }));
        }
예제 #5
0
        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 }));
        }
예제 #6
0
        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 }));
        }
예제 #7
0
        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 }));
        }
예제 #8
0
 public static DataTable GetRoomIdOfNewRoom()
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetRoomIdOfNewRoom"));
 }
예제 #9
0
 public static DataTable GetAllStaffInfo(int sortIndex)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetAllStaffInfo @Sort", new object[] { sortIndex }));
 }
예제 #10
0
 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 }));
 }
예제 #11
0
 public static int AddNewRoom(RoomType roomType, int area)
 {
     return(ExecuteQuery.ExecuteNoneQuery("QLKS_AddNewRoom @RoomTypeID , @Area",
                                          new object[] { roomType, area }));
 }
예제 #12
0
        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 }));
        }
예제 #13
0
 public static DataTable GetData(int BillID)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetAdditionalInfoForBillViewing @BillID", new object[] { BillID }));
 }
예제 #14
0
 public static DataTable GetBillInfoOfCustomer(int customerID)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetBillInfoOfCustomer @CustomerID", new object[] { customerID }));
 }
예제 #15
0
 public static DataTable GetRoomInfo(int IDRoom)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetRoomInfo @ID", new object[] { IDRoom }));
 }
예제 #16
0
 public static DataTable GetAllCustomer(int sort)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetAllCustomer @Sort", new object[] { sort }));
 }
예제 #17
0
 public static int RemoveStaff(int ID)
 {
     return(ExecuteQuery.ExecuteNoneQuery("QLKS_RemoveStaff @StaffID",
                                          new object[] { ID }));
 }
예제 #18
0
 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 }));
 }
예제 #19
0
 public static DataTable GetStaffInfor(string Username)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetStaffInfo @Username", new object[] { Username }));
 }
예제 #20
0
        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 }));
        }
예제 #21
0
 public static int SetServiceInfo(int id, string name, int price)
 {
     return(ExecuteQuery.ExecuteNoneQuery("QLKS_SetServiceInfo @ID , @Name , @Price",
                                          new object[] { id, name, price }));
 }
예제 #22
0
 public static DataTable GetStaffIdOfNewStaff()
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetStaffIdOfNewStaff"));
 }
예제 #23
0
 public static int AddNewService(ServiceType serviceTypeID, string name, int price)
 {
     return(ExecuteQuery.ExecuteNoneQuery("QLKS_AddNewService @ServiceTypeID , @Name , @Price",
                                          new object[] { serviceTypeID, name, price }));
 }
예제 #24
0
 public static DataTable GetServiceIdOfNewService()
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetServiceIdOfNewService"));
 }
예제 #25
0
        public static int InsertNewBill(int RoomReservationID, string Username)
        {
            string Query = "QLKS_InsertNewBill @RoomReservationID , @Username";

            return(ExecuteQuery.ExecuteNoneQuery(Query, new object[] { RoomReservationID, Username }));
        }
예제 #26
0
 public static int RemoveService(int id)
 {
     return(ExecuteQuery.ExecuteNoneQuery("QLKS_RemoveService @ID",
                                          new object[] { id }));
 }
예제 #27
0
 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 }));
 }
예제 #28
0
 public static DataTable GetLaudryServiceRevenue(int RevenueType, DateTime FromDate, DateTime ToDate)
 {
     return(ExecuteQuery.ExecuteReader("QLKS_GetLaudryServiceRevenue @RevenueType , @FromDate , @ToDate",
                                       new object[] { RevenueType, FromDate, ToDate }));
 }
예제 #29
0
        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 }));
        }
예제 #30
0
 public static int SetRoomStatus(int RoomID, RoomStatus status)
 {
     return(ExecuteQuery.ExecuteNoneQuery("QLKS_SetRoomStatus @ID , @Status_", new object[] { RoomID, status }));
 }