/// <summary>
        /// 修改信息
        /// </summary>
        /// <param name="dorrList">LNQ数据集</param>
        public void Update(FM_DistributionOfRecyclingRegisterList dorrList)
        {
            DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

            var varData = from a in ctx.FM_DistributionOfRecyclingRegisterList
                          where a.ID == dorrList.ID
                          select a;

            if (varData.Count() != 1)
            {
                throw new Exception("错误信息");
            }
            else
            {
                FM_DistributionOfRecyclingRegisterList lnqTemp = varData.Single();

                if (lnqTemp.SignPersonnel == null && lnqTemp.SignTime == null)
                {
                    lnqTemp.GrantTime         = ServerTime.Time;
                    lnqTemp.GrantPersonnel    = BasicInfo.LoginName;
                    lnqTemp.GrantDepartment   = dorrList.GrantDepartment;
                    lnqTemp.RecoverDepartment = dorrList.RecoverDepartment;
                    lnqTemp.FileID            = dorrList.FileID;
                }
                else
                {
                    throw new Exception("已签收的记录不能被修改");
                }
            }

            ctx.SubmitChanges();
        }
        /// <summary>
        /// 签收
        /// </summary>
        /// <param name="id">序号</param>
        public void Sign(int id)
        {
            DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

            var varData = from a in ctx.FM_DistributionOfRecyclingRegisterList
                          where a.ID == id
                          select a;

            if (varData.Count() != 1)
            {
                throw new Exception("数据错误");
            }
            else
            {
                FM_DistributionOfRecyclingRegisterList lnqTemp = varData.Single();

                if (lnqTemp.SignPersonnel == null && lnqTemp.SignTime == null)
                {
                    lnqTemp.SignPersonnel = BasicInfo.LoginName;
                    lnqTemp.SignTime      = ServerTime.Time;
                }
                else
                {
                    throw new Exception("记录流程错误,请重新确认");
                }
            }

            ctx.SubmitChanges();
        }
        /// <summary>
        /// 确认回收
        /// </summary>
        /// <param name="id">序号</param>
        public void Recover(int id)
        {
            DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

            try
            {
                var varData = from a in ctx.FM_DistributionOfRecyclingRegisterList
                              where a.ID == id
                              select a;

                if (varData.Count() != 1)
                {
                    throw new Exception("数据错误");
                }
                else
                {
                    FM_DistributionOfRecyclingRegisterList lnqTemp = varData.Single();

                    if (lnqTemp.RecoverPersonnel == null && lnqTemp.RecoverTime == null &&
                        lnqTemp.SignPersonnel != null && lnqTemp.SignTime != null)
                    {
                        lnqTemp.RecoverPersonnel = BasicInfo.LoginName;
                        lnqTemp.RecoverTime      = ServerTime.Time;

                        ctx.SubmitChanges();

                        varData = from a in ctx.FM_DistributionOfRecyclingRegisterList
                                  where a.FileID == lnqTemp.FileID &&
                                  a.RecoverPersonnel == null &&
                                  a.RecoverTime == null
                                  select a;

                        if (varData.Count() == 0 && m_serverBasicInfo.GetFile(lnqTemp.FileID).SortID == 10)
                        {
                            m_serverBasicInfo.OperatorFTPSystemFile(ctx, lnqTemp.FileID, 11);
                        }

                        ctx.SubmitChanges();
                    }
                    else
                    {
                        throw new Exception("记录流程错误,请重新确认");
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="dorrList">LNQ数据集</param>
        public void Add(ref FM_DistributionOfRecyclingRegisterList dorrList)
        {
            DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

            FM_DistributionOfRecyclingRegisterList lnqTemp = new FM_DistributionOfRecyclingRegisterList();

            lnqTemp.FileID            = dorrList.FileID;
            lnqTemp.GrantDepartment   = dorrList.GrantDepartment;
            lnqTemp.RecoverDepartment = dorrList.RecoverDepartment;
            lnqTemp.GrantPersonnel    = BasicInfo.LoginName;
            lnqTemp.GrantTime         = ServerTime.Time;

            ctx.FM_DistributionOfRecyclingRegisterList.InsertOnSubmit(lnqTemp);

            ctx.SubmitChanges();

            dorrList.ID = (from a in ctx.FM_DistributionOfRecyclingRegisterList
                           select a.ID).Max();
        }