Ejemplo n.º 1
0
        public static bool updateTerm(TermModel model)
        {
            using (LIC_CMSEntities db = new LIC_CMSEntities())
            {
                var query = db.TERM_MASTER.Where(x => x.TERM_ID == model.TERM_ID).FirstOrDefault();
                query.TERM_NAME  = model.TERM_NAME;
                query.UPDATED_BY = SessionWrapper.UserId;
                query.UPDATED_ON = DateTime.Now;

                db.SaveChanges();
                return(true);
            }
        }
Ejemplo n.º 2
0
 public static bool insertTerm(TermModel model)
 {
     using (LIC_CMSEntities db = new LIC_CMSEntities())
     {
         db.TERM_MASTER.Add(new TERM_MASTER {
             TERM_NAME  = model.TERM_NAME,
             IS_ACTIVE  = 1,
             CREATED_BY = SessionWrapper.UserId,
             CREATED_ON = DateTime.Now
         });
         db.SaveChanges();
         return(true);
     }
 }