public static string GetStateName(int ID) { DataTable dt = StateDL.GetStates(ID); DataRow dr = dt.Rows[0]; return(dr["name"].ToString()); }
public MailingAddressDL() { CityDetails = new CityDL(); DistrictDetails = new DistrictDL(); StateDetails = new StateDL(); CountryDetails = new CountryDL(); }
public static List <State> GetStateList(string CountryID) { int CID = Convert.ToInt16(CountryID); List <State> States = new List <State>(); DataTable dt = StateDL.GetStates(CID); foreach (DataRow dr in dt.Rows) { State State = new State(); State.StateID = Convert.ToInt16(dr["ID"].ToString()); State.StateName = dr["name"].ToString(); States.Add(State); } return(States); }