示例#1
0
 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();
     }
 }
示例#2
0
 public Order_Edit(ICustomerData customerData, IEmployeeData employeeData, IStatusData statusData, Order order)
 {
     Order     = order;
     Customers = customerData.GetAll();
     Employees = employeeData.GetAll();
     Statuses  = statusData.GetAll();
 }
示例#3
0
 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;
 }
示例#6
0
        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);
        }
示例#9
0
        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;
 }
示例#11
0
 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;
 }
示例#14
0
 public EmployeesController(ICustomerData employeesData) => _CustomersData = employeesData;
示例#15
0
 // 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;
 }
示例#17
0
 public ListModel(ICustomerData customerData)
 {
     this.customerData = customerData;
 }
 public CustomerService(ICustomerData customerData)
 {
     _customerData = customerData;
 }
 public CustomerController(ICustomerData customerData, IUnitOfWork unitOfWork)
 {
     _customerData = customerData;
     _unitOfWork   = unitOfWork;
 }
示例#20
0
 public DetailsModel(ICustomerData customerData)
 {
     this.customerData = customerData;
 }
 public void Usage()
 {
     ICustomerData data12 = Customer.GetCustomerData(12);
     int           id     = data12.CustomerId;
 }
示例#22
0
 public CustomerController(ICustomerData customerData)
 {
     this.customerData = customerData ?? new CustomerData();
 }
示例#23
0
 public CreateModel(ICustomerData customerData, IHtmlHelper htmlHelper)
 {
     _customerData = customerData;
     _htmlHelper   = htmlHelper;
 }
示例#24
0
 public HomeController(ICustomerData customerData)
 {
     _customerData = customerData;
 }
 public CustomersController(ICustomerData customerData)
 {
     this.customerData = customerData;
 }
示例#26
0
 public CustomerController(ICustomerData customerData)
 {
     customers = customerData;
 }
示例#27
0
 public CustomerController(ILogger <CustomerController> logger, ICustomerData customerRepo)
 {
     _logger       = logger;
     _customerRepo = customerRepo;
 }
 public CustomerListModel(IConfiguration config, ICustomerData custmerData)
 {
     this.config      = config;
     this.custmerData = custmerData;
 }
示例#29
0
 public ListModel(IMembershipData membershipData, ICustomerData customerData)
 {
     this.membershipData = membershipData;
     this.customerData   = customerData;
 }
 public AcustomerController(ICustomerData _customerData)
 {
     customerData = _customerData;
 }
示例#31
0
 public QuotesModel(ICustomerData customerData, IQuoteData quoteData)
 {
     _customerData = customerData;
     _quoteData    = quoteData;
 }