/// <summary>
        /// 提交入库信息
        /// </summary>
        /// <param name="inDepotInfo">入库信息, 只取其中入库部分</param>
        /// <param name="returnInfo">添加完毕后查询数据库的返回结果</param>
        /// <param name="error">出错时返回错误信息,无错时返回null</param>
        /// <returns>操作结果</returns>
        public bool SubmitInDepotInfo(S_OrdinaryInDepotBill inDepotInfo, out IQueryResult returnInfo, out string error)
        {
            returnInfo = null;
            error      = null;

            try
            {
                DepotManagementDataContext dataContxt = CommentParameter.DepotDataContext;

                var result = from r in dataContxt.S_OrdinaryInDepotBill where r.Bill_ID == inDepotInfo.Bill_ID select r;

                if (result.Count() == 0)
                {
                    error = string.Format("找不到入库单号为 [{0}] 的普通入库单!", inDepotInfo.Bill_ID);
                    return(false);
                }

                S_OrdinaryInDepotBill bill = result.Single();

                if (bill.BillStatus == CheckInDepotBillStatus.已入库.ToString())
                {
                    error = string.Format("入库单号为 [{0}] 单据状态为已入库", inDepotInfo.Bill_ID);
                    return(false);
                }

                bill.DepotManager = inDepotInfo.DepotManager;
                bill.BillStatus   = inDepotInfo.BillStatus;
                bill.InDepotDate  = ServerTime.Time;

                // 添加信息到入库明细表
                OpertaionDetailAndStock(dataContxt, bill);

                //更新工装库存状态

                IDepotTypeForPersonnel serverDepot = ServerModuleFactory.GetServerModule <IDepotTypeForPersonnel>();

                if (serverDepot.GetDepotInfo(bill.Depot).DepotName == GlobalObject.CE_GoodsType.工装.ToString() &&
                    bill.Bill_Time > Convert.ToDateTime("2012-4-21") &&
                    !UpdateFrockStockStatus(dataContxt, bill.Bill_ID, out error))
                {
                    return(false);
                }

                // 正式使用单据号
                m_assignBill.UseBillNo(dataContxt, "普通入库单", bill.Bill_ID);

                dataContxt.SubmitChanges();

                return(GetAllBill(out returnInfo, out error));
            }
            catch (Exception exce)
            {
                error = exce.Message;
                return(false);
            }
        }
        /// <summary>
        /// 采购员提交单据
        /// </summary>
        /// <param name="billNo">单据号</param>
        /// <param name="status">提交后的单据状态</param>
        /// <param name="returnInfo">返回更新后重新查询的领料单数据集</param>
        /// <param name="error">出错时返回错误信息,无错时返回null</param>
        /// <returns>返回是否成功添加领料单</returns>
        public bool SubmitNewBill(string billNo, OrdinaryInDepotBillStatus status, out IQueryResult returnInfo, out string error)
        {
            returnInfo = null;
            error      = null;

            try
            {
                DepotManagementDataContext dataContxt = CommentParameter.DepotDataContext;

                var result = from r in dataContxt.S_OrdinaryInDepotBill
                             where r.Bill_ID == billNo
                             select r;

                if (result.Count() == 0)
                {
                    error = string.Format("没有找到单据号为 {0} 的普通入库单信息,无法进行此操作", billNo);
                    return(false);
                }

                result.Single().BillStatus = status.ToString();
                result.Single().Bill_Time  = ServerModule.ServerTime.Time;

                if (!m_serverFrockStandingBook.DeleteFrockOrdinaryInDepotBill(dataContxt, billNo, out error))
                {
                    return(false);
                }

                //插入工装信息
                IDepotTypeForPersonnel serverDepot = ServerModuleFactory.GetServerModule <IDepotTypeForPersonnel>();

                if (serverDepot.GetDepotInfo(result.Single().Depot).DepotName == GlobalObject.CE_GoodsType.工装.ToString() &&
                    !CreateNewFrockMessage(result.Single(), out error))
                {
                    return(false);
                }

                dataContxt.SubmitChanges();

                return(GetAllBill(out returnInfo, out error));
            }
            catch (Exception exce)
            {
                error = exce.Message;
                return(false);
            }
        }