Exemplo n.º 1
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 PartController(IPartData db)
 {
     this.db = db;
 }
Exemplo n.º 3
0
 public OrderPart_Detail(IPartData partData, OrderPart OrderPart)
 {
     Constructor(partData, OrderPart);
 }
Exemplo n.º 4
0
 public Part_Index(IPartData partData) : base()
 {
     Parts = partData.GetAll();
 }
 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;
 }