コード例 #1
0
 protected void linkCommand_Command(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "EditTruck")
     {
         DriverDataEditor.IsNew  = false;
         TruckDataEditor.IsNew   = false;
         TrailerDataEditor.IsNew = false;
         var truckToEdit = from truck in ginProcess.GINProcessInformation.Trucks
                           where truck.TruckId == new Guid((string)e.CommandArgument)
                           select truck;
         //TruckDataEditor.DataSource = truckToEdit.ElementAt(0);
         //TruckDataEditor.DataBind();
         TruckRegistrationInfo truckRegistration = new TruckRegistrationInfo()
         {
             GINTruck = truckToEdit.ElementAt(0)
         };
         DriverDataEditor.DataSource = truckRegistration.GINTruck;
         DriverDataEditor.DataBind();
         TruckDataEditor.DataSource = truckRegistration.Truck;
         TruckDataEditor.DataBind();
         TrailerDataEditor.DataSource = truckRegistration.Trailer;
         TrailerDataEditor.DataBind();
         mpeTruckDataEditorExtender.Show();
     }
 }
コード例 #2
0
        protected void btnAddTruck_Click(object sender, EventArgs e)
        {
            bool bPunClosed = (ginProcess.GINProcessInformation.RemainingWeight <= 0);

            if (bPunClosed)
            {
                GINProcessWrapper.ClosePun();
                GINProcessWrapper.RemoveGINProcessInformation();
                transferedData.Return();
            }
            else
            {
                DriverDataEditor.IsNew  = true;
                TruckDataEditor.IsNew   = true;
                TrailerDataEditor.IsNew = true;
                TruckRegistrationInfo truckRegistration = new TruckRegistrationInfo()
                {
                    GINTruck = ginProcess.GetBlankTruck()
                };
                DriverDataEditor.DataSource = truckRegistration.GINTruck;
                DriverDataEditor.DataBind();
                TruckDataEditor.DataSource = truckRegistration.Truck;
                TruckDataEditor.DataBind();
                TrailerDataEditor.DataSource = truckRegistration.Trailer;
                TrailerDataEditor.DataBind();
                mpeTruckDataEditorExtender.Show();
            }
        }
コード例 #3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            errorDisplayer = new ErrorMessageDisplayer(lblMessage);
            errorDisplayer.ClearErrorMessage();

            transferedData = new PageDataTransfer(Request.Path);

            PUNADataEditor.Driver    = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "PUNAcknowledgement");
            DriverDataEditor.Driver  = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "RegisteredTruck");
            TruckDataEditor.Driver   = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "TruckData");
            TrailerDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "TrailerData");
            TruckGridViewer.Driver   = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "RegisteredTruckGrid");
            PUNADataEditor.IsNew     = false;
            try
            {
                ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack);

                PUNADataEditor.Lookup    = ginProcess.LookupSource;
                TruckDataEditor.Lookup   = ginProcess.LookupSource;
                DriverDataEditor.Lookup  = ginProcess.LookupSource;
                TrailerDataEditor.Lookup = ginProcess.LookupSource;
                TruckGridViewer.Lookup   = ginProcess.LookupSource;

                PUNADataEditor.Setup();
                TruckDataEditor.Setup();
                DriverDataEditor.Setup();
                TrailerDataEditor.Setup();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #4
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            errorDisplayer = new ErrorMessageDisplayer(lblMessage);
            errorDisplayer.ClearErrorMessage();

            transferedData         = new PageDataTransfer(Request.Path);
            TruckDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckLoading", "Truck");
            TruckLoadEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckLoading", "TruckLoad");
            StackDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckLoading", "Stack");
            StackGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckLoading", "StackGrid");

            TruckDataEditor.IsNew = false;

            StackDataEditor.Ok     += new EventHandler(StackDataEditor_Ok);
            StackDataEditor.Cancel += new EventHandler(StackDataEditor_Cancel);

            try
            {
                ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack);

                TruckDataEditor.Lookup = ginProcess.LookupSource;
                TruckLoadEditor.Lookup = ginProcess.LookupSource;
                StackDataEditor.Lookup = ginProcess.LookupSource;
                StackGridViewer.Lookup = ginProcess.LookupSource;

                TruckDataEditor.Setup();
                TruckLoadEditor.Setup();
                StackDataEditor.Setup();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TruckDataEditor.DataSource = GINTruckInformation;
         TruckDataEditor.DataBind();
     }
 }
コード例 #6
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            errorDisplayer = new ErrorMessageDisplayer(lblMessage);
            errorDisplayer.ClearErrorMessage();

            transferedData                = new PageDataTransfer(Request.Path);
            TruckDataEditor.Driver        = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "Truck");
            TruckLoadEditor.Driver        = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckLoad");
            StackGridViewer.Driver        = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "StackGrid");
            TruckWeightEditor.Driver      = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckWeight");
            ReturnedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "ReturnedBagsGrid");

            ProposedTruckDataEditor.Driver        = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "Truck");
            ProposedTruckLoadEditor.Driver        = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckLoad");
            ProposedStackGridViewer.Driver        = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "StackGrid");
            ProposedTruckWeightEditor.Driver      = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckWeight");
            ProposedReturnedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "ReturnedBagsGrid");

            TruckDataEditor.IsNew   = false;
            TruckLoadEditor.IsNew   = false;
            TruckWeightEditor.IsNew = false;

            ProposedTruckDataEditor.IsNew   = false;
            ProposedTruckLoadEditor.IsNew   = false;
            ProposedTruckWeightEditor.IsNew = false;

            try
            {
                ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack);

                TruckDataEditor.Lookup        = ginProcess.LookupSource;
                TruckLoadEditor.Lookup        = ginProcess.LookupSource;
                StackGridViewer.Lookup        = ginProcess.LookupSource;
                TruckWeightEditor.Lookup      = ginProcess.LookupSource;
                ReturnedBagsGridViewer.Lookup = ginProcess.LookupSource;

                ProposedTruckDataEditor.Lookup        = ginProcess.LookupSource;
                ProposedTruckLoadEditor.Lookup        = ginProcess.LookupSource;
                ProposedStackGridViewer.Lookup        = ginProcess.LookupSource;
                ProposedTruckWeightEditor.Lookup      = ginProcess.LookupSource;
                ProposedReturnedBagsGridViewer.Lookup = ginProcess.LookupSource;

                TruckDataEditor.Setup();
                TruckLoadEditor.Setup();
                TruckWeightEditor.Setup();

                ProposedTruckDataEditor.Setup();
                ProposedTruckLoadEditor.Setup();
                ProposedTruckWeightEditor.Setup();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            StackGridViewer.DataSource = //GINTruckInformation.Load.Stacks;
                                         from stack in GINTruckInformation.Load.Stacks
                                         select new TruckStackWrapper(stack, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);

            StackGridViewer.DataBind();

            ProposedStackGridViewer.DataSource = //GINTruckInformation.Load.Stacks;
                                                 from stack in ProposedGINTruckInformation.Load.Stacks
                                                 select new TruckStackWrapper(stack, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);

            ProposedStackGridViewer.DataBind();

            ReturnedBagsGridViewer.DataSource = //GINTruckInformation.Weight.ReturnedBags;
                                                from returnedBags in GINTruckInformation.Weight.ReturnedBags
                                                select new ReturnedBagsWrapper(returnedBags, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);

            ReturnedBagsGridViewer.DataBind();

            ProposedReturnedBagsGridViewer.DataSource = //GINTruckInformation.Weight.ReturnedBags;
                                                        from returnedBags in ProposedGINTruckInformation.Weight.ReturnedBags
                                                        select new ReturnedBagsWrapper(returnedBags, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);

            ProposedReturnedBagsGridViewer.DataBind();

            if (!IsPostBack)
            {
                TruckDataEditor.DataSource = GINTruckInformation;
                TruckDataEditor.DataBind();
                TruckLoadEditor.DataSource = GINTruckInformation.Load;
                TruckLoadEditor.DataBind();
                TruckWeightEditor.DataSource = GINTruckInformation.Weight;
                TruckWeightEditor.DataBind();

                ProposedTruckDataEditor.DataSource = ProposedGINTruckInformation;
                ProposedTruckDataEditor.DataBind();
                ProposedTruckLoadEditor.DataSource = ProposedGINTruckInformation.Load;
                ProposedTruckLoadEditor.DataBind();
                ProposedTruckWeightEditor.DataSource = ProposedGINTruckInformation.Weight;
                ProposedTruckWeightEditor.DataBind();
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            StackGridViewer.DataSource =
                from stack in GINTruckInformation.Load.Stacks
                select new TruckStackWrapper(stack, ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);

            StackGridViewer.DataBind();
            var gridCommands = from command in StackGridViewer.Driver.Columns
                               where command.IsCommand
                               select command.AttachedRenderer;

            foreach (LinkGINColumnRenderer linkCommand in gridCommands)
            {
                linkCommand.Command += new CommandEventHandler(linkCommand_Command);
            }

            if (!IsPostBack)
            {
                TruckDataEditor.DataSource = GINTruckInformation;
                TruckDataEditor.DataBind();
                TruckLoadEditor.DataSource = GINTruckInformation.Load;
                TruckLoadEditor.DataBind();
            }
        }