Exemplo n.º 1
0
    /// <summary>
    /// 指定入库
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnInput_Click(object sender, EventArgs e)
    {
        bool retChecked = false;//是否选择

        foreach (GridViewRow gvrow in this.grid.Rows)
        {
            CheckBox chkId = (CheckBox)gvrow.FindControl("chkId");
            if (chkId.Checked == true)
            {
                UStockBB stockBB = new UStockBB();
                BTallyBillBB tallyBillBB = new BTallyBillBB();
                UStockBC stockBC = new UStockBC();

                try
                {
                    BTallyBillData tallyBillModel = tallyBillBB.GetModel(this.IdValue);

                    if (tallyBillModel.instantState != "02")//状态不是“已理货完成”
                    {
                        this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"当前托盘已经指定了库位!\");", true);
                        return;
                    }
                    else
                    {
                        string strwhere = "wareLocatorNo='" + chkId.ValidationGroup + "'";
                        DataSet ds = stockBB.GetList(strwhere);

                        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                        {
                            this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"当前库位已经被占用!\");", true);
                            return;
                        }
                        else
                        {
                            tallyBillModel.instantState = "03";//指定状态为“已入库”
                            tallyBillModel.isInStock = true;// 入库状态
                            tallyBillModel.wareLocatorNo = chkId.ValidationGroup;//库位

                            retChecked = stockBC.SetPalletWarelocator(tallyBillModel,this.ddlWare.SelectedValue);
                        }
                    }
                }
                catch (Exception ex)
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",3);", true);
                    return;
                }
                finally
                {
                    tallyBillBB.Dispose();
                    stockBB.Dispose();
                    stockBC.Dispose();
                }
            }
        }

        if (retChecked)
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"库位指定成功!\"); location.replace('UStockList.aspx?itemNo=" + this.itemNo + "&pTypeNo=main');", true);
            return;
        }

        this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"请选择一个库位!\");", true);
        return;
    }
Exemplo n.º 2
0
    public bool FluencyPalletInStock(string strPalletNo, string strBoxNo, string strWareNo, string strWareLocatorNo, int isrtEmpId)
    {
        UStockBC stockBC = new UStockBC();

        try
        {
            stockBC.EmpID = isrtEmpId;
            return stockBC.FluencyPalletInStock(strPalletNo, strBoxNo, strWareNo, strWareLocatorNo);
        }
        finally
        {
            stockBC.Dispose();
        }
    }
Exemplo n.º 3
0
    public bool SplitPallet(string strBoxNo, string strPalletNo, int empId)
    {
        UStockBC stockBC = new UStockBC();

        try
        {
            stockBC.EmpID = empId;

            return true;
            //return stockBC.SplitPallet(strBoxNo, strPalletNo);
        }
        finally
        {
            stockBC.Dispose();
        }
    }
Exemplo n.º 4
0
    public void SavePickOutInfo_DECHeck(int pickOutPlanID, string strStockUpBillNo, int palletIndex, string strNewPalletNo,
        string strOldBoxNo, string strNewBoxNo, int pickOutNum, int empId, string strOperType)
    {
        UStockBC stockBC = new UStockBC();

        try
        {
            stockBC.EmpID = empId;

            stockBC.SavePickOutInfo_DECheck(pickOutPlanID, strStockUpBillNo, palletIndex, strNewPalletNo, strOldBoxNo, strNewBoxNo, pickOutNum, strOperType, empId);
        }
        finally
        {
            stockBC.Dispose();
        }
    }
Exemplo n.º 5
0
    public bool MovePallet(string strPalletNo, string strNextWareNo, string strNextWareLocatorNo, int empId)
    {
        UStockBC stockBC = new UStockBC();

        try
        {
            stockBC.EmpID = empId;

            return stockBC.MovePallet(strPalletNo, strNextWareNo, strNextWareLocatorNo);
        }
        finally
        {
            stockBC.Dispose();
        }
    }
Exemplo n.º 6
0
    public void JoinBox(string strOldBoxNo, string strNewBoxNo, int pickOutNum, int empId)
    {
        UStockBC stockBC = new UStockBC();

        try
        {
            stockBC.EmpID = empId;

            stockBC.JoinBox(strOldBoxNo, strNewBoxNo, pickOutNum);
        }
        finally
        {
            stockBC.Dispose();
        }
    }