Esempio n. 1
0
        private void InitializeView()
        {
            if (!IsPostBack)
            {
                if (SubStateList != null && SubStateList.Count() > 0)
                {
                    BindData();
                }
                else
                {
                    DisplayMessage("Cannot add to another sub state.The User has been already assigned to all existing Sub States.", true);
                    EndRequest = true;
                    Page.DataBind();
                }
            }

            hlViewUserProfileMain.NavigateUrl = RouteController.UserEdit(UserProfileUserId);
            hlEditUserProfileMain.NavigateUrl = RouteController.UserEdit(UserProfileUserId);
        }
Esempio n. 2
0
        private void BindSubStatesForUser()
        {
            DropDownList SubStatesDLLObj = (DropDownList)formView.FindControl("ddlSubStates");

            SubStatesDLLObj.DataSource = SubStateList;

            SubStatesDLLObj.DataTextField  = "Value";
            SubStatesDLLObj.DataValueField = "Key";
            SubStatesDLLObj.DataBind();

            if (SubStateList == null || SubStateList.Count() == 0)
            {
                SubStatesDLLObj.Items.Add(new ListItem("No sub states available", "0"));
            }
            else
            {
                SubStatesDLLObj.Items.Insert(0, new ListItem("-- Select a substate region --", "0"));
            }
        }