private void InitialOtherOutInPlan()
    {
        using (OtherOutInPickOutPlanBB pickOutPlanBB = new OtherOutInPickOutPlanBB())
        {
            //查找当前备货单下的拣货计划

            string StockUpBillNO = pickOutPlanBB.GetStockUpBillNo(DocEntry);
            if (string.IsNullOrEmpty(StockUpBillNO))
            {
                StockUpBillNO = "";
            }

            this.DtResultNew = pickOutPlanBB.GetList("stockUpBillNo='" + StockUpBillNO.Trim() + "'").Tables[0];

            //添加GUID、是否删除标志
            this.DtResultNew.Columns.Add(new DataColumn("rowId", typeof(string)));
            this.DtResultNew.Columns.Add(new DataColumn("isdel", typeof(bool)));

            if (this.DtResultNew != null && this.DtResultNew != null && this.DtResultNew.Rows.Count > 0)
            {
                foreach (DataRow row in this.DtResultNew.Rows)
                {
                    row["rowId"] = Guid.NewGuid().ToString();
                    row["isdel"] = false;
                }

                this.BindGridPickOutPlan();//绑定拣货计划列表

                //this.btnNewPlan.Enabled = false;
                //this.btnSubmit.Enabled = false;
            }
        }
    }
示例#2
0
    public void FinishOtherPickOutPlan(int pickOutPlanId, int pickOutEmpId)
    {
        OtherOutInPickOutPlanBB pickOutPlanBB = new OtherOutInPickOutPlanBB();
        SCommBB commBB = new SCommBB();

        try
        {

            StringBuilder strSql = new StringBuilder();
            OtherOutInPickOutPlanData pickOutPlanModel = new OtherOutInPickOutPlanData();

            pickOutPlanModel = pickOutPlanBB.GetModel(pickOutPlanId);

            pickOutPlanModel.pickOutDt = System.DateTime.Now.ToString();//拣货时间
            pickOutPlanModel.pickOutEmpId = pickOutEmpId;//拣货人
            pickOutPlanModel.instantState = "03";//已完成

            pickOutPlanBB.ModifyRecord(pickOutPlanModel);

            ////解除库位的锁定
            //strSql.Append(@"update dbo.UStock set isOutStocking=0 where wareLocatorNo='" + pickOutPlanModel.wareLocatorNo
            //    + "' and materialNo='" + pickOutPlanModel.materialNo + "'and isOutStocking=1");
            //commBB.ExecuteSql(strSql.ToString());

            ////更改原箱的是否锁定状态
            //strSql = new StringBuilder();
            //strSql.Append("update dbo.BArrangeBillBox set isOutStocking=0 where wareLocatorNo='" + pickOutPlanModel.wareLocatorNo
            //    + "' and materialNo='" + pickOutPlanModel.materialNo + "' and isOutStocking=1");
            //commBB.ExecuteSql(strSql.ToString());
        }
        finally
        {
            pickOutPlanBB.Dispose();
            commBB.Dispose();
        }
    }