private void InitializeComponents(long workOrderId) { DBContext = new CarServiceFormsDBContext(); SetupListViews(); SetupServiceTypeComboBoxDatasource(); GetWorkOrderData(workOrderId); }
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>(); }
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(); }
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); } }
private void InitializeComponents(long?workOrderId) { DBContext = new CarServiceFormsDBContext(); workOrderInstructionsDataGridView.AutoGenerateColumns = false; SetupWorkOrderData(workOrderId, null, null); }
private void InitializeComponents() { DBContext = new CarServiceFormsDBContext(); SetupDataGridViews(); }
public void InitializeComponents() { DbContext = new CarServiceFormsDBContext(); }
private void InitializeComponents() { DbContext = new CarServiceFormsDBContext(); customersDataGridView.AutoGenerateColumns = false; }
static SettingsHelper() { DBContext = new CarServiceFormsDBContext(); }
private void InitializeComponents(long workOrderId) { DBContext = new CarServiceFormsDBContext(); invoiceItemsDataGridView.AutoGenerateColumns = false; SetupInvoiceData(workOrderId); }