Ejemplo n.º 1
0
 public void Delete(modelActivityType activitytype, bool reload = true)
 {
     db.Delete("tblActivityType", "ID", activitytype);
     if (reload)
     {
         LoadActivityTypes();
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }
Ejemplo n.º 3
0
 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();
     }
 }