예제 #1
0
 public static SqlDataReader GetEmployeeById(int employeeId)
 {
     StoredProcedureParameterList.Clear();
     StoredProcedureName = ConfigurationManager.AppSettings.Get("GetEmployeeByIDSP");
     StoredProcedureParameterList.Add(new SqlParameter("@EmployeeID", employeeId));
     return(DBInteraction.ExecuteSelect(StoredProcedureName, StoredProcedureParameterList));
 }
예제 #2
0
 public static SqlDataReader GetCustomerBillHistory(int customerMobileNumber)
 {
     StoredProcedureParameterList.Clear();
     StoredProcedureName = ConfigurationManager.AppSettings.Get("GetCustomerBillHistorySP");
     StoredProcedureParameterList.Add(new SqlParameter("@customerMobileNumer", customerMobileNumber));
     return(DBInteraction.ExecuteSelect(StoredProcedureName, StoredProcedureParameterList));
 }
예제 #3
0
 public static int UpdateCustomer(int customerMobileNumber, string customerEmail)
 {
     StoredProcedureParameterList.Clear();
     StoredProcedureName = ConfigurationManager.AppSettings.Get("UpdateCustomerSP");
     StoredProcedureParameterList.Add(new SqlParameter("@CustomerMobileNumber", customerMobileNumber));
     StoredProcedureParameterList.Add(new SqlParameter("@CustomerEmailAddress", customerEmail));
     return(DBInteraction.ExecuteNonSelect(StoredProcedureName, StoredProcedureParameterList));
 }
예제 #4
0
 public static int RecordBillPaymentForCustomer(int customerMobileNumber, string billPaymentMode, decimal billAmount)
 {
     StoredProcedureParameterList.Clear();
     StoredProcedureName = ConfigurationManager.AppSettings.Get("RecordBillPaymentForCustomerSP");
     StoredProcedureParameterList.Add(new SqlParameter("@CustomerMobileNumber", customerMobileNumber));
     StoredProcedureParameterList.Add(new SqlParameter("@BillPaymentMode", billPaymentMode));
     StoredProcedureParameterList.Add(new SqlParameter("@BillAmount", billAmount));
     return(DBInteraction.ExecuteNonSelect(StoredProcedureName, StoredProcedureParameterList));
 }
예제 #5
0
 public static int AddCutomer(int customerMobileNumber, string customerName, string customerEmail, int employeeId, string customerIdentity)
 {
     StoredProcedureParameterList.Clear();
     StoredProcedureName = ConfigurationManager.AppSettings.Get("AddCustomerSP");
     StoredProcedureParameterList.Add(new SqlParameter("@CustomerMobileNumber", customerMobileNumber));
     StoredProcedureParameterList.Add(new SqlParameter("@CustomerName", customerName));
     StoredProcedureParameterList.Add(new SqlParameter("@CustomerEmailAddress", customerEmail));
     StoredProcedureParameterList.Add(new SqlParameter("@CustomersEmployeeId", employeeId));
     StoredProcedureParameterList.Add(new SqlParameter("@CustomersIdentity", customerIdentity));
     return(DBInteraction.ExecuteNonSelect(StoredProcedureName, StoredProcedureParameterList));
 }
예제 #6
0
 public static SqlDataReader GetAllEmployees()
 {
     StoredProcedureParameterList.Clear();
     StoredProcedureName = ConfigurationManager.AppSettings.Get("GetAllEmployeesSP");
     return(DBInteraction.ExecuteSelect(StoredProcedureName, StoredProcedureParameterList));
 }
 public DBInteractionTests()
 {
     dbInteractionInstance = new DBInteraction();
 }