private void SaveCountry(string countryId) { BLL.DBInteraction dbinteract = new BLL.DBInteraction(); bool isedit = countryId != "-1" ? true : false; bool s = dbinteract.IsUnique("mstCountry", "CountryAbbr", txtAbbr.Text.Trim()); if (!dbinteract.IsUnique("mstCountry", "CountryAbbr", txtAbbr.Text.Trim()) && !isedit) { GeneralFunctions.RegisterAlertScript(this, "Country Abbr Must Be unique"); return; } int result = dbinteract.AddEditCountry(_userId, Convert.ToInt32(countryId), txtCountryName.Text.Trim().ToUpper(), txtAbbr.Text.Trim().ToUpper(), txtGMT.Text.ToUpper(), txtISD.Text.ToUpper(), txtSector.Text.ToUpper(), isedit); if (result > 0) { Response.Redirect("~/MasterModule/ManageCountry.aspx"); } else { GeneralFunctions.RegisterAlertScript(this, "Error Occured"); } }