示例#1
0
        /// <summary>
        /// 修改施工方案/审查
        /// </summary>
        /// <param name="constructSolution"></param>
        public static void UpdateConstructSolution(Model.Solution_ConstructSolution constructSolution)
        {
            Model.SUBHSSEDB db = Funs.DB;
            Model.Solution_ConstructSolution newConstructSolution = db.Solution_ConstructSolution.FirstOrDefault(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
            if (newConstructSolution != null)
            {
                newConstructSolution.ConstructSolutionName = constructSolution.ConstructSolutionName;
                newConstructSolution.VersionNo             = constructSolution.VersionNo;
                newConstructSolution.UnitId          = constructSolution.UnitId;
                newConstructSolution.InvestigateType = constructSolution.InvestigateType;
                newConstructSolution.SolutinType     = constructSolution.SolutinType;
                newConstructSolution.FileContents    = constructSolution.FileContents;
                newConstructSolution.Remark          = constructSolution.Remark;
                newConstructSolution.States          = constructSolution.States;
                if (!string.IsNullOrEmpty(constructSolution.QRCodeAttachUrl))
                {
                    newConstructSolution.QRCodeAttachUrl = constructSolution.QRCodeAttachUrl;
                }

                db.SubmitChanges();
                if (constructSolution.ConstructSolutionCode != CodeRecordsService.ReturnCodeByDataId(constructSolution.ConstructSolutionId))
                {
                    CodeRecordsService.DeleteCodeRecordsByDataId(constructSolution.ConstructSolutionId);//删除编号
                }
            }
        }