public ShipRoutePresenter(IUnityContainer container, IShipRouteView view)
        {
            View           = view;
            this.container = container;
            this.service   = new WMSServiceClient();
            View.Model     = this.container.Resolve <ShipRouteModel>();

            //Load Documents
            View.LoadDocuments   += new EventHandler <EventArgs>(View_LoadDocuments);
            View.ProcessLines    += new EventHandler <EventArgs>(View_ProcessLines);
            View.LoadOpenProcess += new EventHandler <DataEventArgs <Document> >(View_LoadOpenProcess);
            View.ShowTicket      += new EventHandler <DataEventArgs <Document> >(View_ShowTicket);
            View.UpdateDriver    += new EventHandler <DataEventArgs <string> >(view_UpdateDriver);
            View.CreateShipment  += new EventHandler <EventArgs>(View_CreateShipment);
            View.ShowShipTkt     += new EventHandler <EventArgs>(View_ShowShipTkt);

            //Inicializo las variables

            ProcessWindow pw = new ProcessWindow("Cargando Vista ...");

            docType = new DocumentType {
                DocClass = new DocumentClass {
                    DocClassID = SDocClass.Shipping
                }
            };

            //Load Dates
            LoadDates();
            //Load Routes
            LoadRoutes();
            //Load Drivers
            LoadDrivers();

            LoadOpenDocuments();

            try { View.CboLocation.SelectedItem = App.curLocation; }
            catch { }

            pw.Close();
        }
예제 #2
0
        public ShipRoutePresenter(IUnityContainer container, IShipRouteView view)
        {
            View = view;
            this.container = container;
            this.service = new WMSServiceClient();
            View.Model = this.container.Resolve<ShipRouteModel>();

            //Load Documents
            View.LoadDocuments += new EventHandler<EventArgs>(View_LoadDocuments);
            View.ProcessLines += new EventHandler<EventArgs>(View_ProcessLines);
            View.LoadOpenProcess += new EventHandler<DataEventArgs<Document>>(View_LoadOpenProcess);
            View.ShowTicket += new EventHandler<DataEventArgs<Document>>(View_ShowTicket);
            View.UpdateDriver += new EventHandler<DataEventArgs<string>>(view_UpdateDriver);
            View.CreateShipment += new EventHandler<EventArgs>(View_CreateShipment);
            View.ShowShipTkt += new EventHandler<EventArgs>(View_ShowShipTkt);

            //Inicializo las variables

            ProcessWindow pw = new ProcessWindow("Cargando Vista ...");

            docType = new DocumentType { DocClass = new DocumentClass { DocClassID = SDocClass.Shipping } };

            //Load Dates
            LoadDates();
            //Load Routes
            LoadRoutes();
            //Load Drivers
            LoadDrivers();

            LoadOpenDocuments();

            try { View.CboLocation.SelectedItem = App.curLocation; }
            catch { }

            pw.Close();

        }