/// <summary>
        /// 插入工装所有信息
        /// </summary>
        /// <param name="ordinarybill">普通入库单信息</param>
        /// <param name="error">出错时返回错误信息,无错时返回null</param>
        /// <returns>操作成功返回True,操作失败返回False</returns>
        bool CreateNewFrockMessage(S_OrdinaryInDepotBill ordinarybill, out string error)
        {
            error = null;

            FrockProvingReport serverFrockProvingReport = new FrockProvingReport();

            try
            {
                DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

                var varData = from a in ctx.S_OrdinaryInDepotGoodsBill
                              where a.Bill_ID == ordinarybill.Bill_ID
                              select a;

                foreach (var item in varData)
                {
                    for (int i = 0; i < item.Amount; i++)
                    {
                        string strFrockNumber = m_serverFrockStandingBook.GetNewFrockNumber();

                        S_FrockProvingReport lnqReport = new S_FrockProvingReport();

                        lnqReport.DJH               = m_assignBill.AssignNewNo(serverFrockProvingReport, "工装验证报告单");
                        lnqReport.DJZT              = "等待检验要求";
                        lnqReport.BillType          = "入库检验";
                        lnqReport.BZRQ              = ServerTime.Time;
                        lnqReport.ConnectBillNumber = ordinarybill.Bill_ID;
                        lnqReport.FrockNumber       = strFrockNumber;
                        lnqReport.GoodsID           = item.GoodsID;

                        if (!serverFrockProvingReport.AddBill(lnqReport, null, out error))
                        {
                            return(false);
                        }

                        S_FrockStandingBook lnqBook = new S_FrockStandingBook();

                        lnqBook.GoodsID     = item.GoodsID;
                        lnqBook.FrockNumber = strFrockNumber;
                        lnqBook.Designer    = UniversalFunction.GetPersonnelName(ordinarybill.Designer);

                        if (!m_serverFrockStandingBook.UpdateFrockStandingBook(lnqBook, null, out error))
                        {
                            return(false);
                        }

                        View_F_GoodsPlanCost goodsInfo = UniversalFunction.GetGoodsInfo(lnqBook.GoodsID);

                        m_billMessageServer.DestroyMessage(lnqReport.DJH);
                        m_billMessageServer.SendNewFlowMessage(lnqReport.DJH,
                                                               string.Format("【工装编号】:{0} 【图号型号】:{1} 【物品名称】:{2},※※※ 等待【工艺人员】处理",
                                                                             lnqReport.FrockNumber, goodsInfo.图号型号, goodsInfo.物品名称),
                                                               CE_RoleEnum.工艺人员);
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                error = ex.Message;
                return(false);
            }
        }
        /// <summary>
        /// 插入工装所有信息
        /// </summary>
        /// <param name="frockBill">自制件工装信息</param>
        /// <param name="flag">是否进入工装台帐</param>
        /// <param name="error">出错时返回错误信息,无错时返回null</param>
        /// <returns>操作成功返回True,操作失败返回False</returns>
        bool CreateNewFrockMessage(S_FrockInDepotBill frockBill, bool flag, out string error)
        {
            error = null;

            FrockProvingReport serverFrockProvingReport = new FrockProvingReport();

            try
            {
                DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

                var varData = from a in ctx.S_FrockInDepotGoodsBill
                              where a.Bill_ID == frockBill.Bill_ID
                              select a;

                foreach (var item in varData)
                {
                    for (int i = 0; i < item.Amount; i++)
                    {
                        string strFrockNumber = GetNewFrockNumber();

                        S_FrockProvingReport lnqReport = new S_FrockProvingReport();

                        lnqReport.DJH               = m_assignBill.AssignNewNo(serverFrockProvingReport, "工装验证报告单");
                        lnqReport.DJZT              = "等待检验要求";
                        lnqReport.BillType          = "入库检验";
                        lnqReport.BZRQ              = ServerTime.Time;
                        lnqReport.ConnectBillNumber = frockBill.Bill_ID;
                        lnqReport.FrockNumber       = strFrockNumber;
                        lnqReport.GoodsID           = item.GoodsID;

                        if (!serverFrockProvingReport.AddBill(lnqReport, null, out error))
                        {
                            return(false);
                        }

                        m_billMessageServer.SendNewFlowMessage(lnqReport.DJH,
                                                               string.Format("{0}  ※※※ 请【{1}】处理",
                                                                             UniversalFunction.GetGoodsMessage(lnqReport.GoodsID), CE_RoleEnum.工艺人员.ToString()),
                                                               CE_RoleEnum.工艺人员);

                        if (flag)
                        {
                            S_FrockStandingBook lnqBook = new S_FrockStandingBook();

                            lnqBook.GoodsID     = item.GoodsID;
                            lnqBook.FrockNumber = strFrockNumber;
                            lnqBook.Designer    = UniversalFunction.GetPersonnelName(frockBill.DesignerID);

                            if (!m_serverFrockStandingBook.UpdateFrockStandingBook(lnqBook, null, out error))
                            {
                                return(false);
                            }
                        }
                    }
                }

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