示例#1
0
    protected void tbOrderNo_TextChanged(Object sender, EventArgs e)
    {
        try
        {
            if (this.CurrentOrderNo == null || this.CurrentOrderNo != this.tbOrderNo.Text.Trim())
            {
                OrderHead currentOrderHead = TheOrderMgr.LoadOrder(this.tbOrderNo.Text.Trim(), this.CurrentUser);

                if (currentOrderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CANCEL ||
                    currentOrderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_COMPLETE ||
                    currentOrderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE)
                {
                    this.ShowErrorMessage("Inventory.Error.PrintHu.OrderStatus", currentOrderHead.OrderNo, currentOrderHead.Status);
                    return;
                }

                if (currentOrderHead.SubType != BusinessConstants.CODE_MASTER_ORDER_SUB_TYPE_VALUE_NML)
                {
                    this.ShowErrorMessage("Inventory.Error.PrintHu.OrderSubType", currentOrderHead.OrderNo, currentOrderHead.SubType);
                    return;
                }

                currentOrderHead.OrderDetails = TheOrderDetailMgr.GetOrderDetail(currentOrderHead);
                this.CurrentOrderNo           = currentOrderHead.OrderNo;

                this.ucList.InitPageParameter(currentOrderHead);
                this.ucList.Visible = true;
            }
        }
        catch (BusinessErrorException ex)
        {
            this.ShowErrorMessage(ex);
        }
    }
示例#2
0
    protected void btnOrderNo_Click(object sender, EventArgs e)
    {
        this.lblMessage.Text = string.Empty;
        this.OrderNo         = this.tbOrderNo.Text.Trim();
        OrderHead orderHead = null;

        try
        {
            orderHead = TheOrderMgr.LoadOrder(this.OrderNo, this.CurrentUser);
        }
        catch (BusinessErrorException ex)
        {
            this.ShowErrorMessage(ex);
            this.tbOrderNo.Text = string.Empty;
            this.tbOrderNo.Focus();
        }
        if (orderHead != null)
        {
            this.gv_List.DataSource = TheOrderDetailMgr.GetOrderDetail(this.OrderNo);
            this.gv_List.DataBind();
            this.tbOrderNo.ReadOnly    = true;
            this.gv_List.Visible       = false;
            this.gv_Hu.Visible         = true;
            this.btn_Hu_Create.Visible = true;
            this.btnReceive.Visible    = false;
            InitPageParameter(orderHead.PartyFrom.Code);
        }
    }
    protected void lbtnOrder_Click(object sender, EventArgs e)
    {
        try
        {
            string    orderNo   = ((LinkButton)sender).CommandArgument;
            OrderHead orderHead = TheOrderMgr.LoadOrder(orderNo, this.CurrentUser);
            if (orderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_SUBMIT)
            {
                TheOrderMgr.StartOrder(orderNo, this.CurrentUser);
            }
            List <string> orderNoList = new List <string>();
            orderNoList.Add(orderNo);


            if (EditEvent != null)
            {
                EditEvent(new Object[] { orderNoList }, e);
            }
        }
        catch (BusinessErrorException ex)
        {
            ShowErrorMessage(ex);
        }
    }