/// <summary> /// To Populate all controls /// </summary> /// <param name="DistrictIdno"></param> private void Populate(int DistrictIdno) { CityMastDAL objclsCityMaster = new CityMastDAL(); var objCityMast = objclsCityMaster.SelectById(DistrictIdno); objclsCityMaster = null; if (objCityMast != null) { drpState.SelectedValue = Convert.ToString(objCityMast.State_Idno); txtDistrictName.Text = Convert.ToString(objCityMast.City_Name); txtNameHindi.Text = Convert.ToString(objCityMast.CityName_Hindi); txtAbbreviation.Text = Convert.ToString(objCityMast.City_Abbr); chkStatus.Checked = Convert.ToBoolean(objCityMast.Status); hiddistrictidno.Value = Convert.ToString(objCityMast.City_Idno); //chkLocation.Checked = Convert.ToBoolean(objCityMast.AsLocation); drpState.Focus(); } }
/// <summary> /// To Populate all controls /// </summary> /// <param name="CityIdno"></param> private void Populate(int CityIdno) { CityMastDAL objclsCityMaster = new CityMastDAL(); var objCityMast = objclsCityMaster.SelectById(CityIdno); objclsCityMaster = null; if (objCityMast != null) { drpState.SelectedValue = Convert.ToString(objCityMast.State_Idno); txtCityName.Text = Convert.ToString(objCityMast.City_Name); txtGSTIN_No.Text = Convert.ToString(objCityMast.GSTIN_No == null ? "" : objCityMast.GSTIN_No); txtNameHindi.Text = Convert.ToString(objCityMast.CityName_Hindi); txtAbbreviation.Text = Convert.ToString(objCityMast.City_Abbr); chkStatus.Checked = Convert.ToBoolean(objCityMast.Status); hidcityidno.Value = Convert.ToString(objCityMast.City_Idno); chkLocation.Checked = Convert.ToBoolean(objCityMast.AsLocation); txtSACCode.Text = Convert.ToString(objCityMast.sac_Code == null ? "" : objCityMast.sac_Code); txtCodeSap.Text = Convert.ToString(objCityMast.Code_sap == null ? "" : objCityMast.Code_sap); txtadd1.Text = Convert.ToString(objCityMast.Address1 == null ? "" : objCityMast.Address1); txtadd2.Text = Convert.ToString(objCityMast.Address2 == null ? "" : objCityMast.Address2); drpState.Focus(); } }