/// <summary>
        /// 工装业务处理
        /// </summary>
        /// <param name="ctx">LINQ数据上下文</param>
        /// <param name="billNo">单据号</param>
        /// <param name="error">出错时返回错误信息,无错时返回null</param>
        /// <returns>操作成功返回True,操作失败返回False</returns>
        bool FinishFrock(DepotManagementDataContext ctx, string billNo, out string error)
        {
            error = null;

            try
            {
                var varData = from a in ctx.S_MaterialListReturnedInTheDepot
                              where a.Bill_ID == billNo
                              select a;

                bool blFlag = false;

                foreach (var item in varData)
                {
                    if (UniversalFunction.IsInStandingBook(item.GoodsID, false))
                    {
                        blFlag = true;

                        if (!m_serverFrockStandingBook.IsOperationCountMateBillCount(item.GoodsID, item.Bill_ID, Convert.ToDecimal(item.ReturnedAmount)))
                        {
                            error = "领料数量与工装业务编号数不一致,请重新确认数量的一致性";
                            return(false);
                        }
                    }
                }

                if (blFlag)
                {
                    string strSql = "select b.* from S_MaterialListReturnedInTheDepot as a inner join S_FrockOperation as b " +
                                    " on a.Bill_ID = b.BillID and a.GoodsID = b.GoodsID where a.Bill_ID = '" + billNo + "'";

                    if (!m_serverFrockStandingBook.UpdateFrockStandingBookStock(ctx,
                                                                                GlobalObject.DatabaseServer.QueryInfo(strSql), true, out error))
                    {
                        return(false);
                    }

                    var varReport = from a in ctx.S_FrockOperation
                                    where a.BillID == billNo
                                    select a;

                    foreach (var itemReport in varReport)
                    {
                        itemReport.IsTrue = true;
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                error = ex.Message;
                return(false);
            }
        }