private void fnFillStateDistrictTaluka(string stateID, string districtID, string tehsilID) { clsCommon common = new clsCommon(); DataTable dt; State_ID.Items.Clear(); try { dt = clsState.DisplayAllStates("E"); } catch (Exception ex) { throw new Exception(ex.Message); } common.fillDropDown(State_ID, dt, stateID, "State_Name", "State_ID", "--- Select ---"); if (dt != null) { dt = null; } District_ID.Items.Clear(); try { dt = clsDistrict.StateWiseDistricts(State_ID.SelectedItem.Value, "E"); } catch (Exception ex) { throw new Exception(ex.Message); } common.fillDropDown(District_ID, dt, districtID, "Text", "Value", "--- Select ---"); if (dt != null) { dt = null; } Tehsil_ID.Items.Clear(); try { dt = clsTaluka.DisplayTalukaWithinDistrict(District_ID.SelectedItem.Value, "E"); } catch (Exception ex) { throw new Exception(ex.Message); } common.fillDropDown(Tehsil_ID, dt, tehsilID, "Text", "Value", "--- Select ---"); if (dt != null) { dt = null; } if (common != null) { common = null; } }
private void fnFillStateDistrictTaluka(string stateID, string districtID, string tehsilID) { clsCommon common = new clsCommon(); DataTable dt = clsCountry.ListCountry(); common.fillDropDown(ddlCountry, dt, fkCountryID, "Text", "Value", "--- Select ---"); State_ID.Items.Clear(); dt = clsState.DisplayAllStates("E"); common.fillDropDown(State_ID, dt, stateID, "State_Name", "State_ID", "--- Select ---"); dt.Dispose(); District_ID.Items.Clear(); dt = clsDistrict.StateWiseDistricts(State_ID.SelectedItem.Value, "E"); common.fillDropDown(District_ID, dt, districtID, "Text", "Value", "--- Select ---"); dt.Dispose(); Tehsil_ID.Items.Clear(); dt = clsTaluka.DisplayTalukaWithinDistrict(District_ID.SelectedItem.Value, "E"); common.fillDropDown(Tehsil_ID, dt, tehsilID, "Text", "Value", "--- Select ---"); dt.Dispose(); }