public Order_Edit(ICustomerData customerDb, IEmployeeData employeeDb, IStatusData statusDb, IOrderData orderDb, int id) : this(customerDb, employeeDb, statusDb, orderDb.Get(id)) { if (Order == null) { throw new NotFoundInDatabaseException(); } }
public Order_Edit(ICustomerData customerData, IEmployeeData employeeData, IStatusData statusData, Order order) { Order = order; Customers = customerData.GetAll(); Employees = employeeData.GetAll(); Statuses = statusData.GetAll(); }
public VisitController(IVisitData visitData, ICustomerData customerData, IShopItemRepository shopItemRepository, VisitBl visitBl) { this.visitData = visitData; this.customerData = customerData; this.shopItemRepository = shopItemRepository; this.visitBl = visitBl; }
public CustomerController(ICustomerData customerData, ILogger <CustomerController> logger, IUrlHelper urlHelper) { _customerData = customerData; _logger = logger; _urlHelper = urlHelper; }
public OrderController(ICustomerData customerDb, IEmployeeData employeeDb, IImageData imageListDb, IOrderData orderDb, IPartData partDb, IOrderPartData OrderPartDb, IStatusData statusDb) { this.customerDb = customerDb; this.employeeDb = employeeDb; this.imageListDb = imageListDb; this.orderDb = orderDb; this.partDb = partDb; this.OrderPartDb = OrderPartDb; this.statusDb = statusDb; }
private static ServerServiceDefinition GetServiceDefinition(ICustomerData customerData) { var builder = ServerServiceDefinition.CreateBuilder(); AddMethod <PagedRequest <int>, Customer>(builder, nameof(ICustomerData.GetCustomer), customerData.GetCustomer); AddMethod <PagedRequest <string>, PagedResult <Customer> >(builder, nameof(ICustomerData.GetCustomersByNameMask), customerData.GetCustomersByNameMask); AddMethod <PagedRequest <int>, PagedResult <Contract> >(builder, nameof(ICustomerData.GetCustomerContracts), customerData.GetCustomerContracts); AddMethod <PagedRequest <string>, PagedResult <PersonalAccount> >(builder, nameof(ICustomerData.GetContractPersonalAccounts), customerData.GetContractPersonalAccounts); AddMethod <PagedRequest <string>, PagedResult <TerminalDevice> >(builder, nameof(ICustomerData.GetPersonalAccountTerminalDevices), customerData.GetPersonalAccountTerminalDevices); AddMethod <PagedRequest <string>, PagedResult <Service> >(builder, nameof(ICustomerData.GetTerminalDeviceServices), customerData.GetTerminalDeviceServices); return(builder.Build()); }
private void Construtor(Employee employee, ICustomerData customerData, IEnumerable <Status> statuses, Order order) { Status status = statuses.FirstOrDefault(s => s.Id == order.StatusId); OrderId = order.Id; EmployeeName = employee.Name; CustomerName = customerData.Get(order.CustomerId).Name; StartDate = order.StartDate; EndDate = order.EndDate.GetValueOrDefault(); Description = order.Description; Status = status.StatusDescription; StatusColour = status.StatusColour; HoursWorked = order.HoursWorked; }
public Order_Detail(IEmployeeData employeeData, ICustomerData customerData, IStatusData statusData, IOrderData orderData, int orderId) : base() { Order order = orderData.Get(orderId); if (order == null) { throw new NotFoundInDatabaseException(); } Employee employee = employeeData.Get(order.EmployeeId); IEnumerable <Status> statuses = statusData.GetAll(); Construtor(employee, customerData, statuses, order); }
public Order_FullDetails(ICustomerData customerData, IEmployeeData employeeData, IImageData imageData, IOrderData orderData, IPartData partData, IOrderPartData OrderPartData, IStatusData statusData, int orderId) { Order order = orderData.Get(orderId); if (order == null) { throw new NotFoundInDatabaseException(); } Employee employee = employeeData.Get(order.EmployeeId); Details = new Order_Detail(employee, customerData, statusData, order); this.OrderParts = new List <OrderPart_Detail>(); EmployeePayPerHour = employee.PayPerHour; IEnumerable <OrderPart> OrderParts = OrderPartData.Get(orderId); foreach (OrderPart OrderPart in OrderParts) { OrderPart_Detail newDetail = new OrderPart_Detail(partData, OrderPart); this.OrderParts = this.OrderParts.Concat(new[] { newDetail }); } Images = imageData.GetOrderImages(orderId); }
public CustomerController(ICustomerData db) { this.db = db; }
public AutenticationController(ICustomerData _customerData) { customerdata = _customerData; }
public CustomerController(ICustomerData customerData, LinkGenerator linkGenerator) { _customerData = customerData; _linkGenerator = linkGenerator; }
public ShoppingCartModel(IEquipmentData equipmentData, ICustomerData customerData) { this.EquipmentData = equipmentData; this.CustomerData = customerData; }
public EmployeesController(ICustomerData employeesData) => _CustomersData = employeesData;
// Injecting dependencies as constructor argumnets - Pure DI public ReportingService(ICustomerData customerData, IReportBuilder reportBuilder, IEmailer emailer) { CustomerData = customerData; ReportBuilder = reportBuilder; Emailer = emailer; }
public ApplicationController(IApplicationData db, ICustomerData customerDb) { this.db = db; this.customerDb = customerDb; }
public ListModel(ICustomerData customerData) { this.customerData = customerData; }
public CustomerService(ICustomerData customerData) { _customerData = customerData; }
public CustomerController(ICustomerData customerData, IUnitOfWork unitOfWork) { _customerData = customerData; _unitOfWork = unitOfWork; }
public DetailsModel(ICustomerData customerData) { this.customerData = customerData; }
public void Usage() { ICustomerData data12 = Customer.GetCustomerData(12); int id = data12.CustomerId; }
public CustomerController(ICustomerData customerData) { this.customerData = customerData ?? new CustomerData(); }
public CreateModel(ICustomerData customerData, IHtmlHelper htmlHelper) { _customerData = customerData; _htmlHelper = htmlHelper; }
public HomeController(ICustomerData customerData) { _customerData = customerData; }
public CustomersController(ICustomerData customerData) { this.customerData = customerData; }
public CustomerController(ICustomerData customerData) { customers = customerData; }
public CustomerController(ILogger <CustomerController> logger, ICustomerData customerRepo) { _logger = logger; _customerRepo = customerRepo; }
public CustomerListModel(IConfiguration config, ICustomerData custmerData) { this.config = config; this.custmerData = custmerData; }
public ListModel(IMembershipData membershipData, ICustomerData customerData) { this.membershipData = membershipData; this.customerData = customerData; }
public AcustomerController(ICustomerData _customerData) { customerData = _customerData; }
public QuotesModel(ICustomerData customerData, IQuoteData quoteData) { _customerData = customerData; _quoteData = quoteData; }