예제 #1
0
 public int InsertGrCateIdea(CategoryGroupIdea model)
 {
     model.CreatedDate = DateTime.Now;
     db.CategoryGroupIdeas.Add(model);
     db.SaveChanges();
     return(model.CategoryGroupIdeaID);
 }
예제 #2
0
 public bool InsertIdeaCategory(IdeaCategory model)
 {
     try
     {
         model.IdeaCateViewC  = 0;
         model.CreatedDate    = DateTime.Now;
         model.ModifiedDate   = DateTime.Now;
         model.FinalCloseDate = DateTime.Now.AddDays(90);
         db.IdeaCategories.Add(model);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #3
0
 //InsertViewCount
 public bool InsertViewCount(int ideaId)
 {
     try
     {
         var rs = db.Ideas.SingleOrDefault(x => x.IdeaID == ideaId);
         rs.IdeaViewCount += 1;
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         throw;
     }
 }