//Country protected void LoadCountryCombo() { DDL_Country.DataSource = ObjEntity.Countries; DDL_Country.DataTextField = "CountryName"; DDL_Country.DataValueField = "CountryID"; DDL_Country.DataBind(); DDL_Country.Items.Insert(0, new ListItem("--Select--", "0")); }
//Load Country #region [Load Country] private void LoadCountryDropDown() { try { DDL_Country.DataTextField = "name"; DDL_Country.DataValueField = "id"; DataSet ds = ViewState["DatasetAll"] as DataSet; DDL_Country.DataSource = ds.Tables["Country"]; DDL_Country.DataBind(); DDL_Country.Items.Insert(0, new ListItem(" Select ", "0")); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
public void Bind_ddlCountry() { if (DDL_Country.Items.Count <= 0) { cn.Open(); SqlCommand cmd = new SqlCommand("select County,CountryId from Country", cn); SqlDataReader dr = cmd.ExecuteReader(); DDL_Country.DataSource = dr; DDL_Country.Items.Clear(); DDL_Country.Items.Add("--Please Select country--"); DDL_Country.DataTextField = "County"; DDL_Country.DataValueField = "CountryId"; DDL_Country.DataBind(); cn.Close(); } DDL_Country.Items.Insert(0, new ListItem("--Please Select Country--", "0")); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Adding meta Discription HtmlMeta objMeta = new HtmlMeta(); objMeta.Name = "Description"; objMeta.Content = WebConfig.GetValues("MetaDiscription"); this.Header.Controls.Add(objMeta); // Adding meta KeyWords objMeta = new HtmlMeta(); objMeta.Name = "keywords"; objMeta.Content = WebConfig.GetValues("MetaKeword"); this.Header.Controls.Add(objMeta); //Loading Controls // ---------------------------------------------------------------------------------------------- DDL_Education.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Education); DDL_Education.DataTextField = "Item"; DDL_Education.DataValueField = "Value"; DDL_Education.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_EduDetails.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EduDetails); DDL_EduDetails.DataTextField = "Item"; DDL_EduDetails.DataValueField = "Value"; DDL_EduDetails.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_AnnualIncome.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.AnnualIncomeRange); DDL_AnnualIncome.DataTextField = "Item"; DDL_AnnualIncome.DataValueField = "Value"; DDL_AnnualIncome.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_Currency.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Currency); DDL_Currency.DataTextField = "Item"; DDL_Currency.DataValueField = "Value"; DDL_Currency.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_Occupation.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Occupation); DDL_Occupation.DataTextField = "Item"; DDL_Occupation.DataValueField = "Value"; DDL_Occupation.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_EmpIn.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EmployedIn); DDL_EmpIn.DataTextField = "Item"; DDL_EmpIn.DataValueField = "Value"; DDL_EmpIn.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_BGroup.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.BloodGroup); DDL_BGroup.DataTextField = "Item"; DDL_BGroup.DataValueField = "Value"; DDL_BGroup.DataBind(); DDL_Diet.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Diet); DDL_Diet.DataTextField = "Item"; DDL_Diet.DataValueField = "Value"; DDL_Diet.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_Country.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);; DDL_Country.DataTextField = "Item"; DDL_Country.DataValueField = "Value"; DDL_Country.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_ResidenceIn.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);; DDL_ResidenceIn.DataTextField = "Item"; DDL_ResidenceIn.DataValueField = "Value"; DDL_ResidenceIn.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_State.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.State);; DDL_State.DataTextField = "Item"; DDL_State.DataValueField = "Value"; DDL_State.DataBind(); // ---------------------------------------------------------------------------------------------- DDL_ResidentialStatus.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ResidenceStatus);; DDL_ResidentialStatus.DataTextField = "Item"; DDL_ResidentialStatus.DataValueField = "Value"; DDL_ResidentialStatus.DataBind(); // ---------------------------------------------------------------------------------------------- short shortCounter; DDL_Weight.Items.Insert(0, "-- Select --"); for (shortCounter = 40; shortCounter <= 140; ++shortCounter) { DDL_Weight.Items.Add(shortCounter + " KG"); } // ---------------------------------------------------------------------------------------------- // Lodig selections // ---------------------------------------------------------------------------------------------- // Getting applicationID from Cookie HttpCookieCollection objHttpCookieCollection = Request.Cookies; HttpCookie objHttpCookie = objHttpCookieCollection.Get("MatCookie5639sb"); string strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]); //If Cookie is working if (strApplicationID != null) { //Get Member Informations MatMember objMember = new MatMember(true, strApplicationID, false, false, false, true, true, true, false, false, false, false); DDL_Education.SelectedIndex = objMember.Education; DDL_EduDetails.SelectedIndex = objMember.EduDetails; DDL_AnnualIncome.SelectedIndex = objMember.AnualIncome; DDL_Currency.SelectedIndex = objMember.IncomeIn; DDL_Occupation.SelectedIndex = objMember.Occupation; DDL_EmpIn.SelectedIndex = objMember.EmployedIn; // ---------------------------------------------------------------------------------------------- L_Height.Text = objMember.Height.ToString() + " Cm";; DDL_Weight.SelectedIndex = objMember.Weight - 40; DDL_BGroup.SelectedIndex = objMember.BloodGroup; L_Complexion.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Complexion, objMember.Complexion); switch (objMember.BodyType) { case 1: RB_BType_Slim.Checked = true; break; case 2: RB_BType_Avg.Checked = true; break; case 3: RB_BType_Ath.Checked = true; break; case 4: RB_BType_Heavy.Checked = true; break; default: break; } // ---------------------------------------------------------------------------------------------- DDL_Diet.SelectedIndex = objMember.Diet; switch (objMember.Smoke) { case 1: RB_Smoke_no.Checked = true; break; case 2: RB_Smoke_Yes.Checked = true; break; case 3: RB_Smoke_Occ.Checked = true; break; default: break; } // ---------------------------------------------------------------------------------------------- switch (objMember.Drink) { case 1: RB_Drink_No.Checked = true; break; case 2: RB_Drink_Yes.Checked = true; break; case 3: RB_Drink_Occ.Checked = true; break; default: break; } // ---------------------------------------------------------------------------------------------- //Contact Details // ---------------------------------------------------------------------------------------------- TB_Address.Text = objMember.Address; DDL_Country.SelectedIndex = objMember.Country; DDL_State.SelectedIndex = objMember.State; TB_City.Text = objMember.City; DDL_ResidenceIn.SelectedIndex = objMember.Residence; DDL_ResidentialStatus.SelectedIndex = objMember.ResidenceType; TB_Phone_ISD.Text = "+" + objMember.ISDCode.ToString(); TB_Phone_STD.Text = objMember.AreaCode.ToString(); TB_Phone_NO.Text = objMember.PhoneNo.ToString(); TB_Phone_Mobile.Text = objMember.MobileNO.ToString(); TB_RCity.Text = objMember.ResidenceCity; objMember = null; // ---------------------------------------------------------------------------------------------- }//If StrApplicationID != Null } //if else { sbyte sbyteFlag = 0; string strApplicationID; try { HttpCookieCollection objHttpCookieCollection = Request.Cookies; HttpCookie objHttpCookie = objHttpCookieCollection.Get("MatCookie5639sb"); strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]); if (strApplicationID != null) { //Inserting Education and Occupation sbyteFlag = MatrimonialProfileManager.UpdateEducationalInfo(strApplicationID, (sbyte)DDL_Education.SelectedIndex, (sbyte)DDL_EduDetails.SelectedIndex, (sbyte)DDL_AnnualIncome.SelectedIndex, (short)DDL_Currency.SelectedIndex, (sbyte)DDL_Occupation.SelectedIndex, (sbyte)DDL_EmpIn.SelectedIndex); // setting Physical Attributes sbyte sbyteBodyType = 0; sbyte sbyteSmoke = 0; sbyte sbyteDrink = 0; if (RB_BType_Slim.Checked) { sbyteBodyType = 1; } else if (RB_BType_Avg.Checked) { sbyteBodyType = 2; } else if (RB_BType_Ath.Checked) { sbyteBodyType = 3; } else if (RB_BType_Heavy.Checked) { sbyteBodyType = 4; } //Smoking Habite if (RB_Smoke_no.Checked) { sbyteSmoke = 1; } else if (RB_Smoke_Yes.Checked) { sbyteSmoke = 2; } else if (RB_Smoke_Occ.Checked) { sbyteSmoke = 3; } //Drinking Habit if (RB_Drink_No.Checked) { sbyteDrink = 1; } else if (RB_Drink_Yes.Checked) { sbyteDrink = 2; } else if (RB_Drink_Occ.Checked) { sbyteDrink = 3; } // ---------------------------------------------------------------------------------------------- //Inserting Physical Attributes sbyteFlag += MatrimonialProfileManager.UpdatePhysicalInfo(strApplicationID, (short)DDL_Weight.SelectedIndex, (sbyte)DDL_BGroup.SelectedIndex, sbyteBodyType, (sbyte)DDL_Diet.SelectedIndex, sbyteSmoke, sbyteDrink); // ---------------------------------------------------------------------------------------------- //Setting Contact Details sbyteFlag += MatrimonialProfileManager.UpdateContactInfo(strApplicationID, TB_Address.Text, (short)DDL_Country.SelectedIndex, (sbyte)DDL_State.SelectedIndex, TB_City.Text, TB_Phone_NO.Text, TB_Phone_STD.Text, TB_Phone_ISD.Text, TB_Phone_Mobile.Text, (sbyte)DDL_ResidenceIn.SelectedIndex, (sbyte)DDL_ResidentialStatus.SelectedIndex, TB_RCity.Text); // ---------------------------------------------------------------------------------------------- } if (sbyteFlag == 3)// Every module is updated correctly { Response.Redirect("EditProfile-S3.aspx"); } else// Some have some error { Server.Transfer("../Extras/ErrorReport.aspx"); } } catch (Exception Ex)//Oops Some Error Happend { ErrorLog.WriteErrorLog("Member-EditProfile S2-PB", Ex); Server.Transfer("../Extras/ErrorReport.aspx?id=Cookie"); } }//postbak }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HttpCookieCollection objHttpCookieCollection = Request.Cookies; HttpCookie objHttpCookie = objHttpCookieCollection.Get("MatRegInfo"); //Getting ApplicationID Value // <Meta tag> // Adding meta Discription HtmlMeta objMeta = new HtmlMeta(); objMeta.Name = "Description"; objMeta.Content = WebConfig.GetValues("MetaDiscription"); this.Header.Controls.Add(objMeta); // Adding meta KeyWords objMeta = new HtmlMeta(); objMeta.Name = "keywords"; objMeta.Content = WebConfig.GetValues("MetaKeword"); this.Header.Controls.Add(objMeta); //Loading DDL //Getting Connection String //Connect To database DDL_Education.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Education); DDL_Education.DataTextField = "Item"; DDL_Education.DataValueField = "Value"; DDL_Education.DataBind(); DDL_EduDetails.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EduDetails); DDL_EduDetails.DataTextField = "Item"; DDL_EduDetails.DataValueField = "Value"; DDL_EduDetails.DataBind(); DDL_AnnualIncome.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.AnnualIncomeRange); DDL_AnnualIncome.DataTextField = "Item"; DDL_AnnualIncome.DataValueField = "Value"; DDL_AnnualIncome.DataBind(); DDL_Currency.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Currency); DDL_Currency.DataTextField = "Item"; DDL_Currency.DataValueField = "Value"; DDL_Currency.DataBind(); DDL_Occupation.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Occupation); DDL_Occupation.DataTextField = "Item"; DDL_Occupation.DataValueField = "Value"; DDL_Occupation.DataBind(); DDL_EmpIn.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EmployedIn); DDL_EmpIn.DataTextField = "Item"; DDL_EmpIn.DataValueField = "Value"; DDL_EmpIn.DataBind(); DDL_BGroup.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.BloodGroup); DDL_BGroup.DataTextField = "Item"; DDL_BGroup.DataValueField = "Value"; DDL_BGroup.DataBind(); DDL_Complexion.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Complexion); DDL_Complexion.DataTextField = "Item"; DDL_Complexion.DataValueField = "Value"; DDL_Complexion.DataBind(); DDL_Diet.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Diet); DDL_Diet.DataTextField = "Item"; DDL_Diet.DataValueField = "Value"; DDL_Diet.DataBind(); DDL_Country.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country); DDL_Country.DataTextField = "Item"; DDL_Country.DataValueField = "Value"; DDL_Country.DataBind(); DDL_ResidenceIn.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country); DDL_ResidenceIn.DataTextField = "Item"; DDL_ResidenceIn.DataValueField = "Value"; DDL_ResidenceIn.DataBind(); DDL_State.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.State); DDL_State.DataTextField = "Item"; DDL_State.DataValueField = "Value"; DDL_State.DataBind(); DDL_ResidentialStatus.DataSource = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ResidenceStatus); DDL_ResidentialStatus.DataTextField = "Item"; DDL_ResidentialStatus.DataValueField = "Value"; DDL_ResidentialStatus.DataBind(); short shortCounter; DDL_Weight.Items.Insert(0, "-- Select --"); for (shortCounter = 40; shortCounter <= 140; ++shortCounter) { DDL_Weight.Items.Insert(shortCounter - 39, shortCounter + " KG"); } DDL_Height.Items.Insert(0, "-- Select --"); for (shortCounter = 90; shortCounter <= 185; ++shortCounter) { DDL_Height.Items.Insert(shortCounter - 89, shortCounter + " CM"); } } else { sbyte sbyteFlag = 0; string strApplicationID; //try //{ HttpCookieCollection objHttpCookieCollection = Request.Cookies; HttpCookie objHttpCookie = objHttpCookieCollection.Get("MatRegInfo"); strApplicationID = Crypto.DeCrypto(objHttpCookie.Values[0]); if (strApplicationID != null) { //Inserting Education and Occupation sbyteFlag = MatrimonialProfileManager.InsertEducationalInfo(strApplicationID, (sbyte)DDL_Education.SelectedIndex, (sbyte)DDL_EduDetails.SelectedIndex, (sbyte)DDL_AnnualIncome.SelectedIndex, (short)DDL_Currency.SelectedIndex, (sbyte)DDL_Occupation.SelectedIndex, (sbyte)DDL_EmpIn.SelectedIndex); // setting Physical Attributes sbyte sbyteBodyType = 0; sbyte sbyteSmoke = 0; sbyte sbyteDrink = 0; if (RB_BType_Slim.Checked) { sbyteBodyType = 1; } else if (RB_BType_Avg.Checked) { sbyteBodyType = 2; } else if (RB_BType_Ath.Checked) { sbyteBodyType = 3; } else if (RB_BType_Heavy.Checked) { sbyteBodyType = 4; } if (RB_Smoke_no.Checked) { sbyteSmoke = 1; } else if (RB_Smoke_Yes.Checked) { sbyteSmoke = 2; } else if (RB_Smoke_Occ.Checked) { sbyteSmoke = 3; } if (RB_Drink_No.Checked) { sbyteDrink = 1; } else if (RB_Drink_Yes.Checked) { sbyteDrink = 2; } else if (RB_Drink_Occ.Checked) { sbyteDrink = 3; } //Inserting Physical Attributes sbyteFlag += MatrimonialProfileManager.InsertPhysicalInfo(strApplicationID, (short)(DDL_Height.SelectedIndex + 89), (short)DDL_Weight.SelectedIndex, (sbyte)DDL_BGroup.SelectedIndex, sbyteBodyType, (sbyte)DDL_Diet.SelectedIndex, sbyteSmoke, sbyteDrink, (sbyte)DDL_Complexion.SelectedIndex); //Setting Contact Details sbyteFlag += MatrimonialProfileManager.InsertContactInfo(strApplicationID, TB_Address.Text, (short)DDL_Country.SelectedIndex, (sbyte)DDL_State.SelectedIndex, TB_City.Text, TB_Phone_NO.Text, TB_Phone_STD.Text, TB_Phone_ISD.Text, TB_Phone_Mobile.Text, (short)DDL_ResidenceIn.SelectedIndex, (sbyte)DDL_ResidentialStatus.SelectedIndex, TB_RCity.Text); } if (sbyteFlag == 3) { MatrimonialMemberShip.UpdateIndex(strApplicationID); Server.Transfer("RegistrationStep3.aspx"); } else { Response.Redirect("../Extras/ErrorReport.aspx"); } //} //catch (Exception) //{ // Response.Redirect("../Extras/ErrorReport.aspx?id=Cookie"); //} } }
private void LoadStep2() { using (SqlConnection objConnection = DBConnection.GetSqlConnection()) { objConnection.Open(); try { SqlCommand objCommand = new SqlCommand("SELECT * FROM IndexEducation", objConnection); SqlDataReader objDataReader = objCommand.ExecuteReader(); DDL_Education.DataSource = objDataReader; DDL_Education.DataTextField = "Item"; DDL_Education.DataValueField = "Value"; DDL_Education.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexEduDetails", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_EduDetails.DataSource = objDataReader; DDL_EduDetails.DataTextField = "Item"; DDL_EduDetails.DataValueField = "Value"; DDL_EduDetails.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexAnnualIncomeRange", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_AnnualIncome.DataSource = objDataReader; DDL_AnnualIncome.DataTextField = "Item"; DDL_AnnualIncome.DataValueField = "Value"; DDL_AnnualIncome.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexCurrency", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_Currency.DataSource = objDataReader; DDL_Currency.DataTextField = "Item"; DDL_Currency.DataValueField = "Value"; DDL_Currency.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexOccupation", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_Occupation.DataSource = objDataReader; DDL_Occupation.DataTextField = "Item"; DDL_Occupation.DataValueField = "Value"; DDL_Occupation.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexEmployedIn", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_EmpIn.DataSource = objDataReader; DDL_EmpIn.DataTextField = "Item"; DDL_EmpIn.DataValueField = "Value"; DDL_EmpIn.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexBloodGroup", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_BGroup.DataSource = objDataReader; DDL_BGroup.DataTextField = "Item"; DDL_BGroup.DataValueField = "Value"; DDL_BGroup.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexDiet", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_Diet.DataSource = objDataReader; DDL_Diet.DataTextField = "Item"; DDL_Diet.DataValueField = "Value"; DDL_Diet.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexCountry", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_Country.DataSource = objDataReader; DDL_Country.DataTextField = "Item"; DDL_Country.DataValueField = "Value"; DDL_Country.DataBind(); objDataReader.Close(); objDataReader = objCommand.ExecuteReader(); DDL_ResidenceIn.DataSource = objDataReader; DDL_ResidenceIn.DataTextField = "Item"; DDL_ResidenceIn.DataValueField = "Value"; DDL_ResidenceIn.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexState", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_State.DataSource = objDataReader; DDL_State.DataTextField = "Item"; DDL_State.DataValueField = "Value"; DDL_State.DataBind(); objDataReader.Close(); objCommand = new SqlCommand("SELECT * FROM IndexResidenceStatus", objConnection); objDataReader = objCommand.ExecuteReader(); DDL_ResidentialStatus.DataSource = objDataReader; DDL_ResidentialStatus.DataTextField = "Item"; DDL_ResidentialStatus.DataValueField = "Value"; DDL_ResidentialStatus.DataBind(); objDataReader.Close(); short shortCounter; DDL_Weight.Items.Insert(0, "-- Select --"); for (shortCounter = 40; shortCounter <= 140; ++shortCounter) { DDL_Weight.Items.Insert(shortCounter - 39, shortCounter + " KG"); } objConnection.Close(); } catch (Exception Ex) { ErrorLog.WriteErrorLog("Admin-EditProfile:S2-LD", Ex); objConnection.Close(); Server.Transfer("../Extras/ErrorReport.aspx"); } }//using string strApplicationID = MatrimonialMemberShip.GetApplicationID(HF_MatID.Value); //If Cookie is working if (strApplicationID != null) { //Get Member Informations MatMember objMember = new MatMember(true, strApplicationID, false, false, false, true, true, true, false, false, false, false); DDL_Education.SelectedIndex = objMember.Education; DDL_EduDetails.SelectedIndex = objMember.EduDetails; DDL_AnnualIncome.SelectedIndex = objMember.AnualIncome; DDL_Currency.SelectedIndex = objMember.IncomeIn; DDL_Occupation.SelectedIndex = objMember.Occupation; DDL_EmpIn.SelectedIndex = objMember.EmployedIn; L_Height.Text = objMember.Height.ToString() + " Cm";; DDL_Weight.SelectedIndex = objMember.Weight - 40; DDL_BGroup.SelectedIndex = objMember.BloodGroup; L_Complexion.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Complexion, objMember.Complexion); switch (objMember.BodyType) { case 1: RB_BType_Slim.Checked = true; break; case 2: RB_BType_Avg.Checked = true; break; case 3: RB_BType_Ath.Checked = true; break; case 4: RB_BType_Heavy.Checked = true; break; default: break; } DDL_Diet.SelectedIndex = objMember.Diet; switch (objMember.Smoke) { case 1: RB_Smoke_no.Checked = true; break; case 2: RB_Smoke_Yes.Checked = true; break; case 3: RB_Smoke_Occ.Checked = true; break; default: break; } switch (objMember.Drink) { case 1: RB_Drink_No.Checked = true; break; case 2: RB_Drink_Yes.Checked = true; break; case 3: RB_Drink_Occ.Checked = true; break; default: break; } //Contact Details TB_Address.Text = objMember.Address; DDL_Country.SelectedIndex = objMember.Country; DDL_State.SelectedIndex = objMember.State; TB_City.Text = objMember.City; DDL_ResidenceIn.SelectedIndex = objMember.Residence; DDL_ResidentialStatus.SelectedIndex = objMember.ResidenceType; TB_Phone_ISD.Text = "+" + objMember.ISDCode.ToString(); TB_Phone_STD.Text = objMember.AreaCode.ToString(); TB_Phone_NO.Text = objMember.PhoneNo.ToString(); TB_Phone_Mobile.Text = objMember.MobileNO.ToString(); TB_RCity.Text = objMember.ResidenceCity; objMember = null; } }