protected void btnAddInspector_Click(object sender, EventArgs e) { InspectorDataEditor.IsNew = true; InspectorDataEditor.DataSource = inventoryService.GetBlankInspector(physicalCountInformation); InspectorDataEditor.DataBind(); mpeInspectorDataEditorExtender.Show(); }
void linkCommand_Command(object sender, CommandEventArgs e) { if (e.CommandName == "EditInspector") { InspectorDataEditor.IsNew = false; var inspectorToEdit = from inspector in PhysicalCountInformation.Inspectors where inspector.Id == new Guid((string)e.CommandArgument) select inspector; InspectorDataEditor.DataSource = inspectorToEdit.ElementAt(0); InspectorDataEditor.DataBind(); mpeInspectorDataEditorExtender.Show(); } }
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; } }