public bool UpdateConvention(int state, int id) { Conventionapply convention = zhenjiaoRepository.QueryConventionById(id); convention.ConventionState = state; bool flag = zhenjiaoRepository.UpdateConventionApply(convention); return(flag); }
public Conventionapply QueryConventionById(int id) { Conventionapply convention = null; using (var context = new oaContext()) { convention = context.Conventionapply.FirstOrDefault(x => x.Id == id); context.SaveChanges(); } return(convention); }
public bool UpdateConventionApply(Conventionapply conventionApply) { using (var context = new oaContext()) { try { context.Conventionapply.Update(conventionApply); } catch { return(false); } context.SaveChanges(); } return(true); }