Example #1
0
 public void Delete(modelProjectTopic projectTopic, bool reload = true)
 {
     db.Delete("tblProjectTopic", "ID", projectTopic);
     if (reload)
     {
         LoadProjectTopics();
     }
 }
Example #2
0
 public void Update(modelProjectTopic projectTopic, bool reload = true)
 {
     if (projectTopic.CreatedDate.Year < 2000)
     {
         projectTopic.CreatedDate = new DateTime(2000, 1, 1);
     }
     projectTopic.UpdatedDate = DateTime.Now;
     db.Update("tblProjectTopic", "ID", projectTopic);
     if (reload)
     {
         LoadProjectTopics();
     }
 }
Example #3
0
 public void Insert(modelProjectTopic projectTopic, bool reload = true)
 {
     if (projectTopic.ID == 0)
     {
         projectTopic.ID          = Program.GData.LongID();
         projectTopic.CreatedDate = DateTime.Now;
         projectTopic.UpdatedDate = DateTime.Now;
     }
     db.Insert("tblProjectTopic", "ID", false, projectTopic);
     if (reload)
     {
         LoadProjectTopics();
     }
 }