Beispiel #1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            errorDisplayer = new ErrorMessageDisplayer(lblMessage);
            errorDisplayer.ClearErrorMessage();

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


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

            try
            {
                ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack);

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

                TruckLoadEditor.Setup();
                StackDataEditor.Setup();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
 protected void btnAddStack_Click(object sender, EventArgs e)
 {
     StackDataEditor.IsNew      = true;
     StackDataEditor.DataSource = new TruckStackWrapper(ginProcess.GetBlankTruckStack(GINTruckInformation.Load.TruckId), ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);
     StackDataEditor.DataBind();
     mpeStackDataEditorExtender.Show();
 }
Beispiel #3
0
 void linkCommand_Command(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "EditStack")
     {
         StackDataEditor.IsNew = false;
         var stackToEdit = from stack in GINTruckInformation.Load.Stacks
                           where stack.TruckStackId == new Guid((string)e.CommandArgument)
                           select stack;
         StackDataEditor.DataSource = new TruckStackWrapper(stackToEdit.ElementAt(0), ginProcess.GINProcessInformation.CommodityGradeId, ginProcess.GINProcessInformation.ProductionYear);
         StackDataEditor.DataBind();
         mpeStackDataEditorExtender.Show();
     }
 }