protected void Page_Load(object sender, EventArgs e) { errorDisplayer.ClearErrorMessage(); InspectorGridViewer.DataSource = physicalCountInformation.Inspectors; InspectorGridViewer.DataBind(); var gridCommands = from command in InspectorGridViewer.Driver.Columns where command.IsCommand select command.AttachedRenderer; foreach (LinkGINColumnRenderer linkCommand in gridCommands) { linkCommand.Command += new CommandEventHandler(linkCommand_Command); } if (!IsPostBack) { PhysicalCountEditor.DataSource = PhysicalCountInformation; PhysicalCountEditor.DataBind(); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); PhysicalCountEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TakePhysicalCount", "PhysicalCount"); InspectorDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TakePhysicalCount", "Inspector"); StackCountDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TakePhysicalCount", "StackCount"); InspectorGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TakePhysicalCount", "InspectorGrid"); PhysicalCountEditor.IsNew = false; InspectorDataEditor.Ok += new EventHandler(InspectorDataEditor_Ok); InspectorDataEditor.Cancel += new EventHandler(InspectorDataEditor_Cancel); StackCountDataEditor.Ok += new EventHandler(StackCountDataEditor_Ok); StackCountDataEditor.Cancel += new EventHandler(StackCountDataEditor_Cancel); try { inventoryService = InventoryServices.GetInventoryService(); physicalCountInformation = InventoryServiceWrapper.GetPhysicalCountInformation(IsPostBack); PhysicalCountEditor.Lookup = inventoryService.LookupSource; InspectorDataEditor.Lookup = inventoryService.LookupSource; StackCountDataEditor.Lookup = inventoryService.LookupSource; InspectorGridViewer.Lookup = inventoryService.LookupSource; PhysicalCountEditor.Setup(); InspectorDataEditor.Setup(); StackCountDataEditor.Setup(); } catch (Exception ex) { throw ex; } }