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(); }
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); }
void Start() { customerLibrary = GetComponent <CustomerLibrary>(); ingredientLibrary = GetComponent <IngredientLibrary>(); if (customerLibrary.IsValid() && ingredientLibrary.IsValid()) { CustomerArrives(); } else { QuitGame(); } }
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); }
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); }
public List <CustomerModel> GetCustomerList() { List <CustomerModel> list = new CustomerLibrary().GetCustomerList(); return(list); }
/// <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(); }