protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINGridViewer1.Driver = TruckGridViewDriver; GINDataEditor1.Driver = GINViewConfigurationReader.GetViewConfiguration("GINProcess", "PUNSummary"); GINDataEditor2.Driver = GINViewConfigurationReader.GetViewConfiguration("GINProcess", "Truck"); GINDataEditor2.Ok += new EventHandler(GINDataEditor2_Ok); GINDataEditor2.Cancel += new EventHandler(GINDataEditor2_Cancel); btnAddTruck.Visible = ((WorkflowTaskType)transferedData.GetTransferedData("WorkflowTask") == WorkflowTaskType.LoadTruck) && ((transferedData.GetTransferedData("IsGINTransaction") == null) || (bool)(transferedData.GetTransferedData("IsGINTransaction"))); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINGridViewer1.Lookup = ginProcess.LookupSource; GINDataEditor1.Lookup = ginProcess.LookupSource; GINDataEditor2.Lookup = ginProcess.LookupSource; GINGridViewer1.DataSource = ginProcess.GINProcessInformation.Trucks; GINDataEditor1.Setup(); GINDataEditor2.Setup(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { GINGridViewer1.DataBind(); var gridCommands = from command in GINGridViewer1.Driver.Columns where command.IsCommand select command.AttachedRenderer; foreach (LinkGINColumnRenderer linkCommand in gridCommands) { linkCommand.Command += new CommandEventHandler(linkCommand_Command); } if (!IsPostBack) { GINDataEditor1.DataSource = ginProcess.GINProcessInformation; GINDataEditor1.DataBind(); } }