Ejemplo n.º 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);
        }
Ejemplo n.º 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");
            }
        }
Ejemplo n.º 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");
            }
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 6
0
        internal static SqlDataReader DisplayBonusForEmployee()
        {
            var employeeId = UserInterfaceSetupFunctions.GetEmployeeId();

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

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

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

            return(DBInterface.GetCustomerBillHistory(customerMobileNumber));
        }
Ejemplo n.º 10
0
 /// <summary>
 /// This method Prints the Star Triangle
 /// </summary>
 public static void PrintStarTriangle()
 {
     StarTriangle.HeightOfTriangle = UserInterfaceSetupFunctions.SetHeightOfTriangle();
     StarTriangle.PrintStarTriangle();
 }
Ejemplo n.º 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();
 }