Пример #1
0
        public bool UpdateConvention(int state, int id)
        {
            Conventionapply convention = zhenjiaoRepository.QueryConventionById(id);

            convention.ConventionState = state;
            bool flag = zhenjiaoRepository.UpdateConventionApply(convention);

            return(flag);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public bool UpdateConventionApply(Conventionapply conventionApply)
 {
     using (var context = new oaContext())
     {
         try
         {
             context.Conventionapply.Update(conventionApply);
         }
         catch
         {
             return(false);
         }
         context.SaveChanges();
     }
     return(true);
 }