Esempio n. 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Core.Entity.Users users = new Core.Entity.Users();
            users.UserName = txtUserName.Text;
            users.Password = txtPassword.Text;
            users.IsActive = chkIsActive.Checked;
            users.RoleId   = Convert.ToInt32(ddlRole.SelectedValue);

            usersManager.Add(users);
            BindUsersGrid();
            ResetControls();
        }
Esempio n. 2
0
        protected void grvUsers_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            int         UsersId = Convert.ToInt32(grvUsers.DataKeys[e.RowIndex].Value.ToString());
            GridViewRow row     = (GridViewRow)grvUsers.Rows[e.RowIndex];

            TextBox      txtUserName     = (TextBox)row.Cells[0].Controls[0];
            TextBox      txtPassword     = (TextBox)row.Cells[1].Controls[0];
            CheckBox     chkGridIsActive = (CheckBox)row.Cells[2].Controls[1].FindControl("chkGridIsActive");
            DropDownList ddlGridRoleName = (DropDownList)row.Cells[3].Controls[1].FindControl("ddlGridRoleName");

            Core.Entity.Users users = new Core.Entity.Users();
            users.UserId   = UsersId;
            users.UserName = txtUserName.Text;
            users.Password = txtPassword.Text;
            users.IsActive = chkGridIsActive.Checked;
            users.RoleId   = Int32.Parse(ddlGridRoleName.SelectedValue);
            usersManager.Update(users);

            grvUsers.EditIndex = -1;
            BindUsersGrid();
        }
Esempio n. 3
0
 private void Submit()
 {
     Os.Brain.iBxg.Core.Entity.Users model = new Core.Entity.Users();
 }