/// <summary> /// 拣货单解锁 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnOpenPickOutBill_Click(object sender, EventArgs e) { //获取选中的数据Id foreach (GridViewRow gvrow in this.grid.Rows) { CheckBox chkId = (CheckBox)gvrow.FindControl("chkId"); if (chkId.Checked == true) { string id = this.grid.DataKeys[gvrow.RowIndex].Values["id"].ToString(); //实时获取订单状态 using (CStockUpBillBB stockUpBillBB = new CStockUpBillBB()) { CStockUpBillData stockUpBillModel = stockUpBillBB.GetModel(Convert.ToInt32(id)); //备货单已提交或已生成拣货单 if (stockUpBillModel.instantState != "02" && stockUpBillModel.instantState != "03") { stockUpBillModel.instantState = "03";//状态更改为“已生成拣货单” stockUpBillModel.updtDt = System.DateTime.Now.ToString(); stockUpBillModel.updtEmpId = this.currentUser.empId; stockUpBillBB.ModifyRecord(stockUpBillModel); return; } else { this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"当前备货单不需要解锁拣货单!\");", true); return; } } } } this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"请选择一条记录!\");", true); return; }
public void UpdateStockUpBiillStaus(string stockUpNo) { CStockUpBillBB bb = new CStockUpBillBB(); try { bb.ModifyRecord(stockUpNo); } finally { bb.Dispose(); } }