public void Delete(modelActivityType activitytype, bool reload = true)
 {
     db.Delete("tblActivityType", "ID", activitytype);
     if (reload)
     {
         LoadActivityTypes();
     }
 }
 public void Update(modelActivityType activitytype, bool reload = true)
 {
     if (activitytype.CreatedDate.Year < 2000)
     {
         activitytype.CreatedDate = new DateTime(2000, 1, 1);
     }
     activitytype.UpdatedDate = DateTime.Now;
     db.Update("tblActivityType", "ID", activitytype);
     if (reload)
     {
         LoadActivityTypes();
     }
 }
 public void Insert(modelActivityType activitytype, bool reload = true)
 {
     if (activitytype.ID == 0)
     {
         activitytype.ID          = Program.GData.LongID();
         activitytype.CreatedDate = DateTime.Now;
         activitytype.UpdatedDate = DateTime.Now;
     }
     db.Insert("tblActivityType", "ID", false, activitytype);
     if (reload)
     {
         LoadActivityTypes();
     }
 }