/// <summary> /// Bind data and config the controls (buttons view, CountryStateCityEditMode) /// </summary> public void LoadControl() { organizationComponent = new OrganizationComponent(organizationId); organizationId = organizationComponent.Organization.OrganizationID; btnEditProfile.CommandArgument = "EDIT"; btnEditProfile2.CommandArgument = "EDIT"; FillData(); btnEditProfile.Visible = EnabledButtons; btnEditProfile2.Visible = EnabledButtons; PopulateLabels(); CountryStateCityEditMode.UpdateMap(); CountryStateCityViewMode.UpdateMap(); }
//private void PopulateData() //{ // if (!IsPostBack) // { // BindData(); // } // else // { // BindData(); // } // if (UserController.GetCurrentUserInfo().IsInRole("Administrators") || // UserController.GetCurrentUserInfo().IsInRole("NexsoSupport")) // { // BindData(); // } //} /// <summary> /// Obtener lista de elementos (respuesta) para los pasos 2 a 5 del asistente /// </summary> private void BindData() { var list = ListComponent.GetListPerCategory("Theme", Thread.CurrentThread.CurrentCulture.Name).ToList(); RadListView1.DataSource = list.Where(x => !x.Key.Contains("ctm_")).ToList(); RadListView1.DataBind(); list = ListComponent.GetListPerCategory("Beneficiaries", Thread.CurrentThread.CurrentCulture.Name).ToList(); RadListView2.DataSource = list; RadListView2.DataBind(); list = ListComponent.GetListPerCategory("Sector", Thread.CurrentThread.CurrentCulture.Name).ToList(); RadListView3.DataSource = list; RadListView3.DataBind(); list = ListComponent.GetListPerCategory("WhoAreYou", Thread.CurrentThread.CurrentCulture.Name).ToList(); RadListView4.DataSource = list; RadListView4.DataBind(); //If users is login load the list with its answer if (userId >= 0) { if (!IsPostBack) { SetChkControl("Theme", RadListView1); SetChkControl("Beneficiaries", RadListView2); SetChkControl("Sector", RadListView3); SetChkControl("WhoAreYou", RadListView4); txtEmail.Text = currentUser.Email; txtFirstName.Text = WebUtility.HtmlDecode(currentUser.FirstName); txtLastName.Text = WebUtility.HtmlDecode(currentUser.LastName); CountryStateCityEditMode.SelectedCity = userPropertyComponent.UserProperty.City; CountryStateCityEditMode.SelectedCountry = userPropertyComponent.UserProperty.Country; CountryStateCityEditMode.SelectedState = userPropertyComponent.UserProperty.Region; CountryStateCityEditMode.SelectedAddress = userPropertyComponent.UserProperty.Address; CountryStateCityEditMode.UpdateMap(); } } SetupWizard(Wizard1.ActiveStepIndex); }