public static void AddCountry(CountryDto pCountry) { using (var _db = new Rbr_Db()) { using (var _tx = new Transaction(_db, pCountry)) { CallingPlanManager.AddCountry(_db, pCountry); _tx.Commit(); } } }
protected int getCountryId(Rbr_Db pDb, string pCountryName, int pCountryCode) { CountryDto _country = CallingPlanManager.GetCountry(pDb, pCountryName); if (_country != null) { return(_country.CountryId); } _country = new CountryDto(); _country.Name = pCountryName; _country.CountryCode = pCountryCode; _country.Status = Status.Active; return(CallingPlanManager.AddCountry(pDb, _country)); }