Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.txtBeginDate.Text  = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
            this.txtEndDate.Text    = DateTime.Now.ToString("yyyy-MM-dd");
            this.chkNew.Checked     = true;
            this.chkRelease.Checked = true;

            using (ISession session = new Session())
            {
                this.ddlLocation.Items.Clear();
                this.ddlLocation.Items.Add(new ListItem(" ", ""));
                foreach (WHLocation loc in WHLocation.EffectiveList(session))
                {
                    this.ddlLocation.Items.Add(new ListItem(loc.Name, loc.LocationCode));
                }

                OrderStatusDef def = OrderStatusDef.Retrieve(session, INVCheckHead.ORDER_TYPE_ADJ, (int)INVCheckStatus.New);
                this.chkNew.Text = def.StatusText;
                def = OrderStatusDef.Retrieve(session, INVCheckHead.ORDER_TYPE_ADJ, (int)INVCheckStatus.Release);
                this.chkRelease.Text = def.StatusText;
                def = OrderStatusDef.Retrieve(session, INVCheckHead.ORDER_TYPE_ADJ, (int)INVCheckStatus.Close);
                this.chkClose.Text = def.StatusText;

                WebUtil.SetMagicPager(magicPagerMain, magicPagerMain.PageSize, 1);
                WebUtil.SetMagicPager(magicPagerSub, magicPagerMain.PageSize, 1);

                RestoreLastQuery(session);
            }
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.txtAction.Value = WebUtil.Param("mode");
            this.txtId.Value     = WebUtil.Param("ordNumber");

            ReturnHead head = null;
            using (ISession session = new Session())
            {
                IList <WHLocation> locations = WHLocation.EffectiveList(session);
                this.drpLocation.Items.Clear();
                foreach (WHLocation loc in locations)
                {
                    this.drpLocation.Items.Add(new ListItem(loc.Name, loc.LocationCode));
                }
                IList <ReturnReason> resons = ReturnReason.EffectiveList(session);
                this.drpReason.Items.Clear();
                this.drpReason.Items.Add(new ListItem(" ", "0"));
                foreach (ReturnReason rs in resons)
                {
                    this.drpReason.Items.Add(new ListItem(rs.ReasonText, rs.ReasonID.ToString()));
                }

                if (!this.IsNew)
                {
                    head = ReturnHead.Retrieve(session, this.OrderNumber);
                    this.showInfo(session, head);
                }
            }
            this.setView(head);
        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.txtAction.Value = WebUtil.Param("mode");
            this.txtId.Value     = WebUtil.Param("ordNumber");

            this.setView(null);

            using (ISession session = new Session())
            {
                IList <WHLocation> locations = WHLocation.EffectiveList(session);
                this.drpFromLocation.Items.Clear();
                this.drpToLocation.Items.Clear();
                foreach (WHLocation loc in locations)
                {
                    this.drpFromLocation.Items.Add(new ListItem(loc.Name, loc.LocationCode));
                    this.drpToLocation.Items.Add(new ListItem(loc.Name, loc.LocationCode));
                }

                if (!this.IsNew)
                {
                    WHTransferHead head = WHTransferHead.Retrieve(session, this.OrderNumber);
                    this.setView(head);
                    this.showInfo(session, head);
                    log.DebugFormat("PageLoad - {0}移库单: ordNum={1}, return={2}", head.Status == WHTransferStatus.New ? "编辑" : "查看", this.OrderNumber, this.ReturnUrl);
                }
                else
                {
                    log.Debug("PageLoad-新增移库单: return=" + WebUtil.Param("return"));
                }
            }
        }
    }