Esempio n. 1
0
    protected void ddlLocation_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (this.ddlLocation.SelectedValue.Trim().Length > 0)
        {
            this.ddlArea.Items.Clear();
            this.ddlArea.Items.Add(new ListItem("", ""));
            using (_session = new Session())
            {
                Magic.ERP.Core.WHRepository repository = new WHRepository(_session);
                foreach (WHArea area in repository.GetAreas(this.ddlLocation.SelectedValue.Trim()))
                {
                    this.ddlArea.Items.Add(new ListItem(area.Name, area.AreaCode));
                }

                if (this.hidSkuId.Value.Trim().Length > 0)
                {
                    LoadInventoryStock(_session, int.Parse(this.hidSkuId.Value), this.ddlLocation.SelectedValue.Trim(), this.ddlArea.SelectedValue.Trim(), this.ddlSection.SelectedValue);
                }
            }
        }
        else
        {
            this.ddlArea.Items.Clear();
        }
    }
Esempio n. 2
0
    private void InitialPage()
    {
        using (_session = new Session())
        {
            this.txtMemo.Text           = "";
            this.txtStatus.Text         = "新建";
            this.txtUser.Text           = Magic.Security.SecuritySession.CurrentUser.FullName;
            this.txtInvCheckNumber.Text = "";
            this.ddlLocation.Items.Add(new ListItem(" ", ""));

            WHRepository repository = new WHRepository(_session);
            foreach (WHLocation location in repository.GetLocations())
            {
                TreeNode objNode = new TreeNode();
                objNode.Text  = location.Name;
                objNode.Value = location.LocationCode;
                this.ddlLocation.Items.Add(new ListItem(location.Name, location.LocationCode));
            }

            this.LoadCheckOrder_Item(_session, "");
        }
    }