public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Employees = new List <Support.DTO.Employee>(); data.InternalCompanies = new List <Support.DTO.InternalCompany>(); data.Modules = new List <DTO.Module>(); data.Locations = new List <Support.DTO.Location>(); //try to get data try { data.Employees = supportFactory.GetEmployee().ToList(); data.InternalCompanies = supportFactory.GetInternalCompany().ToList(); data.Locations = supportFactory.GetLocation().ToList(); using (UsageTrackingRptEntities context = CreateContext()) { data.Modules = converter.DB2DTO_ModuleList(context.UsageTrackingMng_Module_View.ToList()); } } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
// // CUSTOM FUNCTION // public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.DevRequestProjects = new List <Support.DTO.DevRequestProject>(); data.DevRequestStatuses = new List <Support.DTO.DevRequestStatus>(); data.DevRequestTypes = new List <Support.DTO.DevRequestType>(); data.Requesters = new List <DTO.Requester>(); data.DevRequestPriorities = new List <Support.DTO.DevRequestPriority>(); data.DevRequestPersons = new List <DTO.DevRequestPerson>(); try { data.DevRequestProjects = supportFactory.GetDevRequestProject().ToList(); data.DevRequestStatuses = supportFactory.GetDevRequestStatus().ToList(); data.DevRequestTypes = supportFactory.GetDevRequestType().ToList(); data.DevRequestPriorities = supportFactory.GetDevRequestPriority().ToList(); using (DevRequestMngEntities context = CreateContext()) { data.DevRequestPersons = converter.DB2DTO_DevRequestPersonList(context.DevRequestMng_DevRequestPerson_View.ToList()); data.Requesters = converter.DB2DTO_RequesterList(context.DevRequestMng_Requester_View.ToList()); } } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
// // CUSTOM FUNCTION // public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Factories = new List <Support.DTO.Factory>(); data.InternalCompanies = new List <Support.DTO.InternalCompany>(); data.InternalDepartments = new List <Support.DTO.InternalDepartment>(); data.JobLevels = new List <Support.DTO.JobLevel>(); data.Locations = new List <Support.DTO.Location>(); data.Offices = new List <Support.DTO.Office>(); data.UserGroups = new List <Support.DTO.UserGroup>(); //try to get data try { data.Factories = supportFactory.GetFactory().ToList(); data.InternalCompanies = supportFactory.GetInternalCompany().ToList(); data.InternalDepartments = supportFactory.GetInternalDepartment().ToList(); data.JobLevels = supportFactory.GetJobLevel().ToList(); data.Locations = supportFactory.GetLocation().ToList(); data.Offices = supportFactory.GetOffice().ToList(); data.UserGroups = supportFactory.GetUserGroup().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
// // CUSTOM // public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); //data.Companies = new List<Support.DTO.InternalCompany>(); try { Framework.DAL.DataFactory frameworkFactory = new Framework.DAL.DataFactory(); int?companyID = frameworkFactory.GetCompanyID(userId); Support.DAL.DataFactory supportFactory = new Support.DAL.DataFactory(); data.Employees = supportFactory.GetEmployee(); using (FactoryWarehouseEntities context = CreateContext()) { data.Branches = AutoMapper.Mapper.Map <List <FactoryWarehouseMng_Branch_View>, List <DTO.BranchDTO> >(context.FactoryWarehouseMng_Branch_View.Where(o => o.CompanyID == companyID).ToList()); } //data.Companies = supportFactory.GetInternalCompany().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
// // CUSTOM FUNCTIONS // public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.QuotationStatuses = new List <Support.DTO.QuotationStatus>(); data.Seasons = new List <Support.DTO.Season>(); data.Factories = new List <Support.DTO.Factory>(); try { data.QuotationStatuses = supportFactory.GetQuotationStatus(); data.Seasons = supportFactory.GetSeason(); data.Factories = supportFactory.GetFactory(userId); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; //int i = 0; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Factories = new List <Module.Support.DTO.Factory>(); data.FrameMaterials = new List <Module.Support.DTO.FrameMaterial>(); //try to get data try { data.Factories = supportFactory.GetFactory().ToList(); data.FrameMaterials = supportFactory.GetFrameMaterial().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); try { int?companyID = fwFactory.GetCompanyID(userId); //data.FactoryWarehouses = this.GetFactoryWarehouse().ToList(); data.ProductionItemGroups = this.GetProductionItemGroup().ToList(); data.ProductionItemMaterialTypes = this.GetProductionItemType().ToList(); data.ProductionItemSpecs = this.GetProductionItemSpec().ToList(); data.productionItemTypeSupports = this.GetProductionItemType2().ToList(); //data.YesNoValues = supportFactory.GetYesNo().ToList(); using (ProductionItemEntities context = CreateContext()) { data.FactoryWarehouses = AutoMapper.Mapper.Map <List <ProductionItemMng_FactoryWarehouse_View>, List <DTO.FactoryWarehouse> >(context.ProductionItemMng_FactoryWarehouse_View.Where(o => o.CompanyID == companyID).ToList()); } } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Employees = new List <Support.DTO.Employee>(); data.FactoryRawMaterialSupplierList = new List <DTO.FactoryRawMaterialSupplier>(); //data.SupplierList = new List<DTO.Supplier>(); data.Locations = new List <Support.DTO.FactoryLocation>(); data.Factories = new List <Support.DTO.Factory>(); try { data.Employees = supportFactory.GetEmployee().ToList(); data.Locations = supportFactory.GetFactoryLocation(); data.Factories = supportFactory.GetFactory(userId); data.FactoryRawMaterialSupplierList = GetFactoryRawMaterialSupplierList(); //data.SupplierList = GetSupplierList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Seasons = new List <DTO.Season>(); data.YesNoValues = new List <DTO.YesNo>(); data.ProductGroups = new List <DTO.spProductGroup>(); //try to get data try { data.Seasons = GetSeason().ToList(); data.YesNoValues = GetYesNo().ToList(); using (SeatCushionMngEntities context = CreateContext()) { data.ProductGroups = converter.DB2DTO_spProductGroup(context.SupportMng_ProductGroup_View.ToList()); } } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Seasons = new List <DTO.Season>(); data.YesNoValues = new List <DTO.YesNo>(); data.ProductGroups = new List <DTO.ProductGroup>(); data.CushionTypes = new List <DTO.CushionType>(); //try to get data try { data.Seasons = GetSeason().ToList(); data.YesNoValues = GetYesNo().ToList(); data.ProductGroups = GetProductGroup().ToList(); data.CushionTypes = GetCushionType().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; //int i = 0; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.YesNoValues = new List <YesNo>(); data.PaymentMethods = new List <PaymentMethod>(); data.PaymentTypes = new List <PaymentType>(); //try to get data try { data.YesNoValues = GetYesNo().ToList(); data.PaymentMethods = GetPaymentMethod().ToList(); data.PaymentTypes = GetPaymentType().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData result = new DTO.SearchFilterData(); return(result); }
public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); try { } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); try { data.YesNoValues = supportFactory.GetYesNo().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData result = new DTO.SearchFilterData(); result.LedgerAccounts = new List <Support.DTO.LedgerAccount>(); try { result.LedgerAccounts = supportFactory.GetLedgerAccount(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(result); }
public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Companies = new List <Module.Support.DTO.InternalCompany>(); try { data.Companies = supportFactory.GetInternalCompany().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
// // CUSTOM FUNCTION // public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Seasons = new List <Support.DTO.Season>(); //try to get data try { data.Seasons = supportFactory.GetSeason().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Locations = new List <Support.DTO.FactoryLocation>(); data.KeyRawMaterials = new List <DTO.KeyRawMaterial>(); try { data.Locations = supportFactory.GetFactoryLocation(); data.KeyRawMaterials = GetKeyMaterialList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public DTO.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData result = new DTO.SearchFilterData(); result.YesNos = new List <Support.DTO.YesNo>(); result.ClientPaymentMethods = new List <Support.DTO.ClientPaymentMethod>(); try { result.YesNos = supportFactory.GetYesNo(); result.ClientPaymentMethods = supportFactory.GetClientPaymentMethod(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(result); }
// // CUSTOM FUNCTION // public DTO.SearchFilterData GetSearchFilter(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.SearchFilterData data = new DTO.SearchFilterData(); data.Seasons = new List <Support.DTO.Season>(); data.Suppliers = new List <Support.DTO.Supplier>(); try { Task task1 = Task.Factory.StartNew(() => { data.Seasons = supportFactory.GetSeason(); }); Task task2 = Task.Factory.StartNew(() => { data.Suppliers = supportFactory.GetSupplier(userId); }); Task.WaitAll(task1, task2); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }