コード例 #1
0
        private void InitializeComponents(long workOrderId)
        {
            DBContext = new CarServiceFormsDBContext();

            SetupListViews();
            SetupServiceTypeComboBoxDatasource();

            GetWorkOrderData(workOrderId);
        }
コード例 #2
0
        private void InitializeComponents()
        {
            DBContext = new CarServiceFormsDBContext();

            suppliesDataGridView.AutoGenerateColumns = false;

            Supplies                        = DBContext.Supplies.ToList();
            SuppliesBindingList             = new BindingList <Supplies>(Supplies);
            suppliesDataGridView.DataSource = SuppliesBindingList;

            DeletedSupplies = new List <long>();
        }
コード例 #3
0
        public void InitializeComponents(long selectedCustomerId, long selectedVehicleId)
        {
            DbContext = new CarServiceFormsDBContext();

            SelectedCustomerId = selectedCustomerId;
            SelectedVehicleId  = selectedVehicleId;

            SelectedCustomer = DbContext.Customer.Find(selectedCustomerId);
            SelectedVehicle  = DbContext.Vehicle.Find(selectedVehicleId);

            SetupCustomerFields();
            SetupVehicleFields();
        }
コード例 #4
0
        private void LoadWorkOrders()
        {
            using (var dbContext = new CarServiceFormsDBContext())
            {
                var workOrdersDTO = dbContext.WorkOrder
                                    .OrderBy(wo => wo.Created)
                                    .ToList()
                                    .Select(wo => new WorkOrderDTO()
                {
                    Id         = wo.Id,
                    Number     = wo.Number,
                    Created    = wo.Created,
                    Deadline   = wo.Deadline,
                    Customer   = wo.Vehicle.Customer.ShortDescription,
                    Vehicle    = wo.Vehicle.ShortDescription,
                    HasService = wo.Service != null,
                    HasInvoice = wo.Invoice != null
                })
                                    .ToList();

                workOrdersDataGridView.DataSource = new SortableBindingList <WorkOrderDTO>(workOrdersDTO);
            }
        }
コード例 #5
0
 private void InitializeComponents(long?workOrderId)
 {
     DBContext = new CarServiceFormsDBContext();
     workOrderInstructionsDataGridView.AutoGenerateColumns = false;
     SetupWorkOrderData(workOrderId, null, null);
 }
コード例 #6
0
 private void InitializeComponents()
 {
     DBContext = new CarServiceFormsDBContext();
     SetupDataGridViews();
 }
コード例 #7
0
 public void InitializeComponents()
 {
     DbContext = new CarServiceFormsDBContext();
 }
コード例 #8
0
 private void InitializeComponents()
 {
     DbContext = new CarServiceFormsDBContext();
     customersDataGridView.AutoGenerateColumns = false;
 }
コード例 #9
0
 static SettingsHelper()
 {
     DBContext = new CarServiceFormsDBContext();
 }
コード例 #10
0
 private void InitializeComponents(long workOrderId)
 {
     DBContext = new CarServiceFormsDBContext();
     invoiceItemsDataGridView.AutoGenerateColumns = false;
     SetupInvoiceData(workOrderId);
 }