protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //fill dropdown gender ddlGender.Items.Add(new ListItem(Gender.Convert(Gender.Male), Gender.Male.ToString())); ddlGender.Items.Add(new ListItem(Gender.Convert(Gender.Female), Gender.Female.ToString())); //end fill } }
protected void Page_Load(object sender, EventArgs e) { AdminVerification(); if (!IsPostBack) { //fill dropdown gender ddlGender.Items.Add(new ListItem(Gender.Convert(Gender.Male), Gender.Male.ToString())); ddlGender.Items.Add(new ListItem(Gender.Convert(Gender.Female), Gender.Female.ToString())); //end fill FillPageInfo(); } }
// کد های این قسمت به هندلر منتقل شد //protected void btnEditProfile_Click(object sender, EventArgs e) //{ //int userID = SysProperty.Client.UserID; //UserInfoMan_Business userInfoMan = new UserInfoMan_Business(); //DBmessage dbm = userInfoMan.EditUserProfile(txtbEmail.Text, txtbName.Text, txtbLastName.Text, txtbAffiliations.Text, txtbPhoneNumber.Text, txtbFax.Text, txtbNationalCode.Text, // txtbFieldsOfInterest.Text, txtbBirthDate.Text, txtbEducation.Text, Convert.ToInt32(ddlGender.SelectedValue)); //ShowNotify(dbm); //} public string isMaleOrFemale(int gender) { if (user.User.Sex != null && Gender.Convert(user.User.Sex.ID) == "Male" && gender == 1) { return("selected='selected'"); } else if (user.User.Sex != null && Gender.Convert(user.User.Sex.ID) == "Female" && gender == 2) { return("selected='selected'"); } else { return(""); } }