Beispiel #1
0
        /// <summary>
        /// This method counts the disticnt characters in a case insenstive manner
        /// </summary>
        public static void CountCharactersCaseInSensitive()
        {
            var listOfCharacters = UserInterfaceSetupFunctions.GetListOfCharacters(CharacterOperationType.CaseInsensitive);

            //CountCharactersUsingLINQ.CountCharactersInString(listOfCharacters);
            CountCharactersUsingDictionary.CountCharactersInString(listOfCharacters);
        }
Beispiel #2
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");
            }
        }
Beispiel #3
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");
            }
        }
Beispiel #4
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");
            }
        }
        internal static List <char> GetListOfCharacters(CharacterOperationType characterOperationType)
        {
            var userString = UserInterfaceSetupFunctions.GetUserInputString();

            return(ExtendedUserUtilities.GenerateCharacterList(userString, characterOperationType));
        }
Beispiel #6
0
        internal static SqlDataReader DisplayBonusForEmployee()
        {
            var employeeId = UserInterfaceSetupFunctions.GetEmployeeId();

            return(DBInterface.GetBonusForEmployee(employeeId));
        }
Beispiel #7
0
        internal static SqlDataReader DisplayEmployeesCustomers()
        {
            var employeeId = UserInterfaceSetupFunctions.GetEmployeeId();

            return(DBInterface.GetCutomersForEmployee(employeeId));
        }
Beispiel #8
0
        internal static SqlDataReader DisplayEmployeeByID()
        {
            var employeeId = UserInterfaceSetupFunctions.GetEmployeeId();

            return(DBInterface.GetEmployeeById(employeeId));
        }
Beispiel #9
0
        internal static SqlDataReader DisplayCustomerBillHistory()
        {
            var customerMobileNumber = UserInterfaceSetupFunctions.GetMobileNumber();

            return(DBInterface.GetCustomerBillHistory(customerMobileNumber));
        }
Beispiel #10
0
 /// <summary>
 /// This method Prints the Star Triangle
 /// </summary>
 public static void PrintStarTriangle()
 {
     StarTriangle.HeightOfTriangle = UserInterfaceSetupFunctions.SetHeightOfTriangle();
     StarTriangle.PrintStarTriangle();
 }
Beispiel #11
0
 /// <summary>
 /// This method prints a triangle by taking Start and End character input from user
 /// </summary>
 public static void PrintTriangleUsingStartEndCharacters()
 {
     CharacterTriangle.CharacterArray = UserInterfaceSetupFunctions.SetCharacterArrayUsingStartEndCharacters();
     CharacterTriangle.PrintTriangularOutput();
 }