diff --git a/SGGL/BLL/CQMS/Check/CheckControlService.cs b/SGGL/BLL/CQMS/Check/CheckControlService.cs
index a0ae87aa..efd386c6 100644
--- a/SGGL/BLL/CQMS/Check/CheckControlService.cs
+++ b/SGGL/BLL/CQMS/Check/CheckControlService.cs
@@ -195,37 +195,43 @@ namespace BLL
else
return null;
}
+
///
/// 修改质量检查与控制
///
///
public static void UpdateCheckControl(Model.Check_CheckControl CheckControl)
{
- Model.SGGLDB db = Funs.DB;
- Model.Check_CheckControl newCheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControl.CheckControlCode);
- newCheckControl.DocCode = CheckControl.DocCode;
- newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId;
- newCheckControl.UnitWorkId = CheckControl.UnitWorkId;
- newCheckControl.UnitId = CheckControl.UnitId;
- newCheckControl.CheckDate = CheckControl.CheckDate;
- newCheckControl.IsSubmit = CheckControl.IsSubmit;
- newCheckControl.SubmitMan = CheckControl.SubmitMan;
- newCheckControl.IsOK = CheckControl.IsOK;
- newCheckControl.CNProfessionalCode = CheckControl.CNProfessionalCode;
- newCheckControl.QuestionType = CheckControl.QuestionType;
- newCheckControl.CheckSite = CheckControl.CheckSite;
- newCheckControl.QuestionDef = CheckControl.QuestionDef;
- newCheckControl.LimitDate = CheckControl.LimitDate;
- newCheckControl.RectifyOpinion = CheckControl.RectifyOpinion;
- newCheckControl.AttachUrl = CheckControl.AttachUrl;
- newCheckControl.HandleWay = CheckControl.HandleWay;
- newCheckControl.RectifyDate = CheckControl.RectifyDate;
- newCheckControl.ReAttachUrl = CheckControl.ReAttachUrl;
- newCheckControl.State = CheckControl.State;
- newCheckControl.SaveHandleMan = CheckControl.SaveHandleMan;
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ Model.Check_CheckControl newCheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControl.CheckControlCode);
+ newCheckControl.DocCode = CheckControl.DocCode;
+ newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId;
+ newCheckControl.UnitWorkId = CheckControl.UnitWorkId;
+ newCheckControl.UnitId = CheckControl.UnitId;
+ newCheckControl.CheckDate = CheckControl.CheckDate;
+ newCheckControl.IsSubmit = CheckControl.IsSubmit;
+ newCheckControl.SubmitMan = CheckControl.SubmitMan;
+ newCheckControl.IsOK = CheckControl.IsOK;
+ newCheckControl.CNProfessionalCode = CheckControl.CNProfessionalCode;
+ newCheckControl.QuestionType = CheckControl.QuestionType;
+ newCheckControl.CheckSite = CheckControl.CheckSite;
+ newCheckControl.QuestionDef = CheckControl.QuestionDef;
+ newCheckControl.LimitDate = CheckControl.LimitDate;
+ newCheckControl.RectifyOpinion = CheckControl.RectifyOpinion;
+ newCheckControl.AttachUrl = CheckControl.AttachUrl;
+ newCheckControl.HandleWay = CheckControl.HandleWay;
+ newCheckControl.RectifyDate = CheckControl.RectifyDate;
+ newCheckControl.ReAttachUrl = CheckControl.ReAttachUrl;
+ newCheckControl.State = CheckControl.State;
+ newCheckControl.SaveHandleMan = CheckControl.SaveHandleMan;
+ newCheckControl.IsUpdate = null;
- db.SubmitChanges();
+ db.SubmitChanges();
+ }
}
+
+
public static List GetListDataForApi(string state, string name, string projectId, int index, int page)
{
using (var db = new Model.SGGLDB(Funs.ConnString))