void bindCity(int id) { oblCity = new Store.City.BusinessLogic.City(); try { objCitylist = oblCity.GetAllCityList(id, 0, ""); if (objCitylist != null) { ListItem al = new ListItem("<-Select City->", "0", true); ddlCityID.DataSource = objCitylist; ddlCityID.DataValueField = "CityID"; ddlCityID.DataTextField = "CityName"; ddlCityID.DataBind(); ddlCityID.Items.Insert(0, al); } else { ddlCityID.DataSource = null; ddlCityID.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(UserInfo).FullName, 1); } finally { oblCity = null; objCitylist = null; } }
void BindCity() { oblCity = new Store.City.BusinessLogic.City(); try { objCitylist = oblCity.GetAllCityList(0, 0, ""); if (objCitylist != null) { dgvCity.DataSource = objCitylist; dgvCity.DataBind(); } else { dgvCity.DataSource = null; dgvCity.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(City).FullName, 1); } finally { oblCity = null; objCitylist = null; } }