public DocumentConceptPresenter(IUnityContainer container, IDocumentConceptView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<DocumentConceptModel>(); //Event Delegate View.LoadSearch += new EventHandler<DataEventArgs<string>>(this.OnLoadSearch); View.New += new EventHandler<EventArgs>(this.OnNew); View.LoadData += new EventHandler<DataEventArgs<DocumentConcept>>(this.OnLoadData); View.Save += new EventHandler<EventArgs>(this.OnSave); View.Delete += new EventHandler<EventArgs>(this.OnDelete); View.Model.DocumentClassList = service.GetDocumentClass(new DocumentClass()); View.Model.EntityList = service.GetDocumentConcept(new DocumentConcept()) .Where(f => f.Name != "Default").ToList(); View.Model.Record = null; }
public static void LoadServiceMasters() { WMSServiceClient service = new WMSServiceClient(); //Status App.DocStatusList = service.GetStatus(new Status()); App.EntityStatusList = App.DocStatusList.Where(f => f.StatusType.StatusTypeID == SStatusType.Active).ToList(); App.DocStatusList = App.DocStatusList.Where(f => f.StatusType.StatusTypeID == SStatusType.Document).ToList(); //Pick Methods App.PickMethodList = service.GetPickMethod(new PickMethod { Active = true }); //Document Types App.DocTypeList = service.GetDocumentType(new DocumentType()); //Locations App.LocationList = service.GetLocation(new Location { Status = new Status { StatusID = EntityStatus.Active } }) .OrderBy(f => f.Name).ToList(); //Companies App.CompanyList = service.GetCompany(new Company()); //Data Types App.DataTypeList = service.GetDataType(new DataType()); //DocumentConcepts App.DocumentConceptList = service.GetDocumentConcept(new DocumentConcept()); //Bin Directions Hashtable binDirections = new Hashtable(); binDirections.Add(2, "Out only"); binDirections.Add(1, "In only"); binDirections.Add(0, "In/Out"); App.BinDirectionList = binDirections; //Custom Process App.CustomProcessList = service.GetCustomProcess(new CustomProcess()); //Connection Printers App.PrinterConnectionList = service.GetConnection(new Connection { ConnectionType = new ConnectionType { RowID = CnnType.Printer } }); App.ClassEntityList = service.GetClassEntity(new ClassEntity { }); }