Esempio n. 1
0
 public static Guid InsertCountry(string name)
 {
     using (CountryTableAdapter adapter = new CountryTableAdapter())
     {
         Guid countryId = Guid.NewGuid();
         adapter.Insert(countryId, name);
         return(countryId);
     }
 }
Esempio n. 2
0
 public bool InsertCountry(string Name, string usr, string pass)
 {
     if (authenticate(usr, pass, 25) == false)
     {
         return(false);
     }
     try
     {
         CountryTableAdapter u = new CountryTableAdapter();
         u.Insert(Name);
     }
     catch (Exception e) { return(false); }
     return(true);
 }