protected void SaveTherapistChange_Click(object sender, EventArgs e) { var bsn = ListBoxUserTherapist.SelectedValue; var Id = ListBoxTherapist.SelectedValue; if (!string.IsNullOrEmpty(bsn) && !string.IsNullOrEmpty(Id)) { DAL.DBUserConnection dBUserConnection = new DAL.DBUserConnection(); var result = dBUserConnection.ChangeTherapist(loggedinUser, bsn, Convert.ToInt32(Id)); showMessage(result); } else { showMessage("FOUT: Er is of geen behandelaar of geen gebruiker geselecteerd!"); } }
protected void SaveRole_Click(object sender, EventArgs e) { var bsn = ListBoxUsers.SelectedValue; var roleid = ListBoxRoles.SelectedValue; if (!string.IsNullOrEmpty(bsn) && !string.IsNullOrEmpty(roleid)) { DAL.DBUserConnection dBUserConnection = new DAL.DBUserConnection(); var result = dBUserConnection.ChangeRole(loggedinUser, bsn, Convert.ToInt32(roleid)); showMessage(result); } else { showMessage("FOUT: Er is of geen rol of geen gebruiker geselecteerd!"); } }
public string getHandedOutByName() { try { DAL.DBUserConnection dBUserConnection = new DAL.DBUserConnection(); if (HandedOutByID != 0) { User user = dBUserConnection.GetUser(HandedOutByID); return(user.FirstName + " " + user.LastName); } else { return(""); } } catch (Exception ex) { return(""); } }
protected void SaveAllowUser_Click(object sender, EventArgs e) { loggedinUser = Session["User"] as Entities.User; int result = 0; foreach (GridViewRow row in UserGrid.Rows) { CheckBox ck = ((CheckBox)row.FindControl("ItemCheckBox")); if (ck.Checked && ck.Visible) { try { var a = row.Cells[1].Text; DAL.DBUserConnection dBUserConnection = new DAL.DBUserConnection(); int result1 = dBUserConnection.ConfirmUser(loggedinUser, row.Cells[2].Text, row.Cells[3].Text); result = +result1; } catch (Exception ex) { showMessage(ex.Message); } } else { //Code if it is not checked ......may not be required } } if (result != 1) { showMessage("Er zijn " + result + " gebruikers goedgekeurd"); } else { showMessage("Er is " + result + " gebruiker goedgekeurd"); } }
public static UserData GetUserDataFromDB(User LoggedInUser) { DAL.DBUserConnection dBUserConnection = new DAL.DBUserConnection(); return(dBUserConnection.GetUserData(LoggedInUser)); }