コード例 #1
0
        internal static void RecordBillPayment()
        {
            var customerMobileNumber = UserInterfaceSetupFunctions.GetMobileNumber();
            var billPaymentMode      = UserInterfaceSetupFunctions.GetBillPaymemtMode();
            var billAmount           = UserInterfaceSetupFunctions.GetBillAmount();
            int insertCount          = DBInterface.RecordBillPaymentForCustomer(customerMobileNumber, billPaymentMode, billAmount);

            if (insertCount > 0)
            {
                Console.WriteLine("Inserted Customer Bill Successfully");
            }
        }
コード例 #2
0
        internal static void UpdateCustomer()
        {
            var customerMobileNumber = UserInterfaceSetupFunctions.GetMobileNumber();
            var customerEmail        = UserInterfaceSetupFunctions.GetCustomerEmail();
            int updateCount          = DBInterface.UpdateCustomer(customerMobileNumber, customerEmail);

            if (updateCount == 0)
            {
                Console.WriteLine("Update Customer Not Successful");
            }
            else
            {
                Console.WriteLine("Updated Customer successfully");
            }
        }
コード例 #3
0
        internal static void AddCustomer()
        {
            var customerMobileNumber = UserInterfaceSetupFunctions.GetMobileNumber();
            var customerName         = UserInterfaceSetupFunctions.GetCustomerName();
            var customerEmail        = UserInterfaceSetupFunctions.GetCustomerEmail();
            var employeeId           = UserInterfaceSetupFunctions.GetEmployeeId();
            var customerIdentity     = UserInterfaceSetupFunctions.GetCustomerIdentity();
            int insertCount          = DBInterface.AddCutomer(customerMobileNumber, customerName, customerEmail,
                                                              employeeId, customerIdentity);

            if (insertCount > 0)
            {
                Console.WriteLine("Inserted Customer Successfully");
            }
        }
コード例 #4
0
        internal static SqlDataReader DisplayCustomerBillHistory()
        {
            var customerMobileNumber = UserInterfaceSetupFunctions.GetMobileNumber();

            return(DBInterface.GetCustomerBillHistory(customerMobileNumber));
        }