public static Guid InsertCountry(string name) { using (CountryTableAdapter adapter = new CountryTableAdapter()) { Guid countryId = Guid.NewGuid(); adapter.Insert(countryId, name); return(countryId); } }
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); }