public static void removeUserFromProject(string user_id, string project_id) { Dao.Execute("delete from user_project_role where user_id = '" + user_id + "' and project_id = " + project_id + " and role_id != 1"); }
public static void register(string userId, string username) { Dao.Execute("insert into account (auth_id, username) values('" + userId + "', '" + username + "')"); }
public static void addUserToProject(string user_id, string user_role, string project_id) { Dao.Execute("insert into user_project_role(user_id, project_id, role_id) values('" + user_id + "', '" + project_id + "', " + user_role + ")"); }
public static DataRow[] getAllProjects() { return(Dao.Execute("select project.id, project.name, project.description, account.username from project" + " inner join user_project_role on project.id = user_project_role.project_id" + " inner join account on account.auth_id = user_project_role.user_id")); }