Exemple #1
0
 public static PhysicalCountInfo GetPhysicalCountInformation(bool isPostBack)
 {
     if (!isPostBack)
     {
         PageDataTransfer   transferedData           = new PageDataTransfer(HttpContext.Current.Request.Path);
         Guid               physicalCountId          = (Guid)transferedData.GetTransferedData("PhysicalCountId");
         IInventoryServices invertoryServices        = InventoryServices.GetInventoryService();
         PhysicalCountInfo  physicalCountInformation = invertoryServices.OpenPhysicalCount(physicalCountId);
         HttpContext.Current.Session["Physical-Count-Information"] = physicalCountInformation;
         return(physicalCountInformation);
     }
     else
     {
         return((PhysicalCountInfo)HttpContext.Current.Session["Physical-Count-Information"]);
     }
 }
Exemple #2
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            PhysicalCountInfo pc = new PhysicalCountInfo()
            {
                Id                = Guid.NewGuid(),
                WarehouseId       = new Guid(SystemLookup.LookupSource.GetLookup("CurrentWarehouse")["Id"]),
                IsBeginingCount   = false,
                PhysicalCountDate = DateTime.Now
            };

            InventoryServices.GetInventoryService().CreatePhysicalCount(pc);
            PageDataTransfer physicalCountTransfer = new PageDataTransfer(Request.ApplicationPath + "/TakePhysicalCount.aspx");

            physicalCountTransfer.RemoveAllData();
            physicalCountTransfer.TransferData["PhysicalCountId"] = pc.Id;
            physicalCountTransfer.TransferData["ReturnPage"]      = HttpContext.Current.Request.Path;
            physicalCountTransfer.Navigate();
        }
Exemple #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;
            }
        }