コード例 #1
0
//		private void Checking()
//		{
//			string strPoID=this.txtPoID.Text.Trim();
//			Hashtable htapp=(Hashtable)Application["appconf"];
//			string strcons=(string)htapp["cons"];
//			StoBusi=new BusiComm.StorageBusi(strcons);
//			try
//			{
//				CMSMStruct.LoginStruct ls1=(CMSMStruct.LoginStruct)Session["Login"];
//				if(StoBusi.IsExistPoStockDetailStateUncheck(strPoID))
//				{
//					this.Popup("该采购订单下还有未审核通过的子订单,请先审核子订单!");
//					return;
//				}
//
//				if(StoBusi.PoSotckMainChecked(strPoID,ls1.strOperName))
//				{
//					this.SetSuccMsgPageBydir("采购订单完整审核成功!","Storage/wfmPoStock.aspx");
//					return;
//				}
//				else
//				{
//					this.SetErrorMsgPageBydir("采购订单完整审核时发生错误,请重试!");
//					return;
//				}
//			}
//			catch(Exception er)
//			{
//				this.clog.WriteLine(er);
//				this.SetErrorMsgPageBydir("查询错误,请重试!");
//				return;
//			}
//		}

        private void Execing()
        {
            string    strPoID = this.txtPoID.Text.Trim();
            Hashtable htapp   = (Hashtable)Application["appconf"];
            string    strcons = (string)htapp["cons"];

            StoBusi = new BusiComm.StorageBusi(strcons);
            try
            {
                if (!StoBusi.IsExistPoStockDetailStock(strPoID))
                {
                    this.Popup("该订单下没有任何明细,请添加订单明细!");
                    return;
                }
                if (StoBusi.PoSotckMainExecing(strPoID))
                {
                    this.SetSuccMsgPageBydir("采购订单开始执行成功!", "Storage/wfmPoStock.aspx");
                    return;
                }
                else
                {
                    this.SetErrorMsgPageBydir("采购订单开始执行时发生错误,请重试!");
                    return;
                }
            }
            catch (Exception er)
            {
                this.clog.WriteLine(er);
                this.SetErrorMsgPageBydir("查询错误,请重试!");
                return;
            }
        }