示例#1
0
        protected void lnkEdit_Click(object sender, EventArgs e)
        {
            StackCountDataEditor.IsNew = false;
            var stackCountToEdit = from stack in PhysicalCountInformation.Stacks
                                   where stack.Id == new Guid(((LinkButton)sender).CommandArgument)
                                   select stack;

            StackCountDataEditor.DataSource = stackCountToEdit.ElementAt(0);
            errorDisplayer.ClearErrorMessage();
            mpeStackCountDataEditorExtender.Show();
            StackCountDataEditor.DataBind();
        }
示例#2
0
        protected void btnAddStackCount_Click(object sender, EventArgs e)
        {
            StackCountDataEditor.IsNew = true;
            StackPhysicalCountInfo blankStack = inventoryService.GetBlankStackCount(physicalCountInformation);
            object oPreviousStack             = StackCountDataEditor.DataSource;

            if (oPreviousStack != null)
            {
                blankStack.ShedId  = ((StackPhysicalCountInfo)oPreviousStack).ShedId;
                blankStack.StackId = ((StackPhysicalCountInfo)oPreviousStack).StackId;
            }
            StackCountDataEditor.DataSource = blankStack;
            StackCountDataEditor.DataBind();
            mpeStackCountDataEditorExtender.Show();
        }
示例#3
0
        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;
            }
        }