コード例 #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;
     }
 }