private void Initialize(UserInfo info) { this.dropRole.DataSource = StaticRescourse.GetRoleType(); Helper.SetDropDownList(this.dropRole); this.dropRole.DataBind(); if (info.Id > 0) { this.txtUserName.Text = !string.IsNullOrEmpty(info.Name) ? info.Name : string.Empty; this.txtIdCode.Text = info.Code; this.txtPassword.Attributes.Add("value", info.Password); this.dropRole.SelectedValue = info.Role.ToString(); this.txtEmail.Text = !string.IsNullOrEmpty(info.EMail) ? info.EMail : string.Empty; this.txtContent.Text = !string.IsNullOrEmpty(info.content) ? info.content : string.Empty; } else { this.dropRole.SelectedValue = "1"; } }