Esempio n. 1
0
 public void Delete(modelCountry country, bool reload = true)
 {
     db.Delete("tblCountry", "ID", country);
     if (reload)
     {
         LoadCountries();
     }
 }
Esempio n. 2
0
 public void Update(modelCountry country, bool reload = true)
 {
     if (country.CreatedDate.Year < 2000)
     {
         country.CreatedDate = new DateTime(2000, 1, 1);
     }
     country.UpdatedDate = DateTime.Now;
     db.Update("tblCountry", "ID", country);
     if (reload)
     {
         LoadCountries();
     }
 }
Esempio n. 3
0
 public void Insert(modelCountry country, bool reload = true)
 {
     if (country.ID == 0)
     {
         country.ID          = Program.GData.LongID();
         country.CreatedDate = DateTime.Now;
         country.UpdatedDate = DateTime.Now;
     }
     db.Insert("tblCountry", "ID", false, country);
     if (reload)
     {
         LoadCountries();
     }
 }