示例#1
0
        protected void Page_Init(object sender, EventArgs e)
        {
            session             = XpoHelper.GetNewSession();
            dsInventory.Session = session;
            dsItemUnit.Session  = session;
            treeInventory.DataBind();
            dsInventory.CriteriaParameters["OrganizationId"].DefaultValue = "7e46b424-e0f5-4583-97f7-32bd2ec97e7e";
            if (!IsPostBack)
            {
                Session["InventorySelected"] = "FA31071D-6010-4788-83B9-9F0CE0C90C5F"; //Khoa mặc định
                string       defaultKey = Guid.Parse(Session["InventorySelected"].ToString()).ToString().Replace("-", string.Empty);
                TreeListNode node       = treeInventory.FindNodeByKeyValue(defaultKey);
                if (node != null)
                {
                    node.Focus();
                }
                ItemUnits = InventoryTransactionBO.getItemUnitsInInventory(session, Guid.Parse(Session["InventorySelected"].ToString()));
            }
            System.Diagnostics.Debug.WriteLine(String.Format("Pageload InventoryId: {0}", Session["InventorySelected"].ToString()));
            this.grdataproduct.DataSource = ItemUnits;
            this.grdataproduct.DataBind();

            //grdBalanceOfItems.DataSource = InventoryJournals;
            //grdBalanceOfItems.DataBind();

            grdBalanceOfInventoryCart.DataSource = InventoryLedgers;
            grdBalanceOfInventoryCart.DataBind();
        }
示例#2
0
        protected void grdataproduct_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            Inventory inventory = (Inventory)treeInventory.FocusedNode.DataItem;

            if (inventory != null)
            {
                Session["InventorySelected"] = inventory.InventoryId.ToString();
                ItemUnits = InventoryTransactionBO.getItemUnitsInInventory(session, Guid.Parse(Session["InventorySelected"].ToString()));
                this.grdataproduct.DataSource = ItemUnits;
                this.grdataproduct.DataBind();
            }
        }
示例#3
0
        protected void grdataproduct_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            Inventory inventory = (Inventory)treeInventory.FocusedNode.DataItem;

            if (inventory != null)
            {
                System.Diagnostics.Debug.WriteLine(String.Format("InventoryId: {0}, Name: {1}", inventory.InventoryId, inventory.Name));
                Session["InventorySelected"] = inventory.InventoryId.ToString();
                ItemUnits = InventoryTransactionBO.getItemUnitsInInventory(session, Guid.Parse(Session["InventorySelected"].ToString()));
                this.grdataproduct.DataSource = ItemUnits;
                this.grdataproduct.DataBind();
            }
        }