重构UpdateLawRegulationIdentify方法的数据库上下文
This commit is contained in:
parent
b7fb2e95bb
commit
38244296b8
|
|
@ -49,21 +49,23 @@ namespace BLL
|
|||
/// <param name="lawRegulationIdentify">法律法规辨识实体</param>
|
||||
public static void UpdateLawRegulationIdentify(Model.Law_LawRegulationIdentify lawRegulationIdentify)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
|
||||
if (newLawRegulationIdentify != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
newLawRegulationIdentify.VersionNumber = lawRegulationIdentify.VersionNumber;
|
||||
newLawRegulationIdentify.ProjectId = lawRegulationIdentify.ProjectId;
|
||||
newLawRegulationIdentify.IdentifyPerson = lawRegulationIdentify.IdentifyPerson;
|
||||
newLawRegulationIdentify.IdentifyDate = lawRegulationIdentify.IdentifyDate;
|
||||
newLawRegulationIdentify.ManagerContent = lawRegulationIdentify.ManagerContent;
|
||||
newLawRegulationIdentify.IdentifyConclude = lawRegulationIdentify.IdentifyConclude;
|
||||
newLawRegulationIdentify.States = lawRegulationIdentify.States;
|
||||
newLawRegulationIdentify.GroupMember = lawRegulationIdentify.GroupMember;
|
||||
newLawRegulationIdentify.Remark = lawRegulationIdentify.Remark;
|
||||
newLawRegulationIdentify.UpdateDate = lawRegulationIdentify.UpdateDate;
|
||||
db.SubmitChanges();
|
||||
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
|
||||
if (newLawRegulationIdentify != null)
|
||||
{
|
||||
newLawRegulationIdentify.VersionNumber = lawRegulationIdentify.VersionNumber;
|
||||
newLawRegulationIdentify.ProjectId = lawRegulationIdentify.ProjectId;
|
||||
newLawRegulationIdentify.IdentifyPerson = lawRegulationIdentify.IdentifyPerson;
|
||||
newLawRegulationIdentify.IdentifyDate = lawRegulationIdentify.IdentifyDate;
|
||||
newLawRegulationIdentify.ManagerContent = lawRegulationIdentify.ManagerContent;
|
||||
newLawRegulationIdentify.IdentifyConclude = lawRegulationIdentify.IdentifyConclude;
|
||||
newLawRegulationIdentify.States = lawRegulationIdentify.States;
|
||||
newLawRegulationIdentify.GroupMember = lawRegulationIdentify.GroupMember;
|
||||
newLawRegulationIdentify.Remark = lawRegulationIdentify.Remark;
|
||||
newLawRegulationIdentify.UpdateDate = lawRegulationIdentify.UpdateDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue