Esempio n. 1
0
        static void Main(string[] args)
        {
            List <TimeSheetEntryModels> timeSheetEntries = GetTimeSheetEntries();

            List <CustomerModel> customers = CustomerLibrary.GetCustomers();

            foreach (var customer in customers)
            {
                var customerTime = TimeSheetProcessor.CalculateTimeForCustomer(timeSheetEntries, customer.Name);
                SimulateSendingMail(customer, customerTime);
            }

            List <PaymentModel> payments = PaymentLibrary.GetPayments();



            var timeWorked = TimeSheetProcessor.CalculateTimeWorked(timeSheetEntries);

            foreach (var paymentModel in payments)
            {
                if (timeWorked > paymentModel.HourLimit)
                {
                    SimulatePayment(paymentModel, timeWorked);
                    break;
                }
            }

            Console.WriteLine();
            Console.Write("Press any key to exit application...");
            Console.ReadKey();
        }
Esempio n. 2
0
        public List <ContactWithAddress> GetBusinessContacts(Guid userId)
        {
            CustomerLibrary customerLibrary = new CustomerLibrary(new EF.Database.Models.HawkSoftContactContext()); // need to inject DB context in contructor (this will be done through DI)

            var contacts = customerLibrary.GetBusinessContacts(userId);

            return(contacts);
        }
Esempio n. 3
0
    void Start()
    {
        customerLibrary   = GetComponent <CustomerLibrary>();
        ingredientLibrary = GetComponent <IngredientLibrary>();

        if (customerLibrary.IsValid() && ingredientLibrary.IsValid())
        {
            CustomerArrives();
        }
        else
        {
            QuitGame();
        }
    }
Esempio n. 4
0
        public void EditContact(BusinessContact contact)
        {
            CustomerLibrary customerLibrary = new CustomerLibrary(new EF.Database.Models.HawkSoftContactContext()); // need to inject DB context in contructor (this will be done through DI)

            customerLibrary.EditContact(contact);
        }
Esempio n. 5
0
        public void RemoveContact(Guid userId, Guid contactId)
        {
            CustomerLibrary customerLibrary = new CustomerLibrary(new EF.Database.Models.HawkSoftContactContext()); // need to inject DB context in contructor (this will be done through DI)

            customerLibrary.RemoveBusinessContact(userId, contactId);
        }
Esempio n. 6
0
        public List <CustomerModel> GetCustomerList()
        {
            List <CustomerModel> list = new CustomerLibrary().GetCustomerList();

            return(list);
        }
Esempio n. 7
0
        /// <summary>
        /// button to access Custoemr Library
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button8_Click(object sender, EventArgs e)
        {
            CustomerLibrary window = new CustomerLibrary();

            window.Show();
        }