Exemple #1
0
        public void LoadWorkOrders()
        {
            UnitOfWork unitOfWork = new UnitOfWork();

            Search();
            this.EmployeeBindingSource.DataSource = unitOfWork.EmployeesRepo.Get();

            this.EquipmentTypeBindingSource.DataSource = unitOfWork.EquipmentTypesRepo.Get();
            this.ProgramLookUpRepo.DataSource          = unitOfWork.DropdownsRepo.Get(m => m.Category == "Programs");
            this.MainActLookUpRepo.DataSource          = unitOfWork.DropdownsRepo.Get(m => m.Category == "Projects");
            this.ActivityLookUpRepo.DataSource         = unitOfWork.DropdownsRepo.Get(m => m.Category == "Activity");
            this.SubActLookUpRepo.DataSource           = unitOfWork.DropdownsRepo.Get(m => m.Category == "SubActivity");
            this.txtSearch.Properties.DataSource       = new UnitOfWork().WorkOrdersRepo.Get(m => m.PPEId != null);
            WorkOrderGrid.RefreshData();
            backgroundWorker.RunWorkerCompleted += (s, eventArgs) =>
            {
                backgroundWorker         = new BackgroundWorker();
                backgroundWorker.DoWork += (a, b) =>
                {
                    this.Invoke(new Action(() =>
                    {
                        LoadWorkOrderDetails(0);
                    }));
                };
                backgroundWorker.RunWorkerAsync();
            };
        }
Exemple #2
0
        public void LoadWorkOrders()
        {
            UnitOfWork unitOfWork = new UnitOfWork();

            this.EmployeeBindingSource.DataSource      = unitOfWork.EmployeesRepo.Get();
            this.WorkOrderBindingSource.DataSource     = unitOfWork.WorkOrdersRepo.Get(m => m.DocActions.Any(x => x.EndorsedTo == User.UserId));
            this.EquipmentTypeBindingSource.DataSource = unitOfWork.EquipmentTypesRepo.Get();

            WorkOrderGrid.RefreshData();
        }