protected void Denied(object sender, EventArgs e) { //string projectID = projID.Text; string userID = (string)Session["StaffNo"]; string name = (string)Session["firstName"] + " " + (string)Session["lastName"]; string role = getRole(); string comments = "no comment"; string dateTime = getDateTime(); Button button = (Button)sender; DB db = new DB(); string updateSigned = "UPDATE 17agileteam6db.projects SET RIS_denied = 1 WHERE project_ID = " + projectID; string historyQuery = "INSERT INTO 17agileteam6db.history(project_ID, user, date_time, projectAction, Comments) " + "VALUES ('" + projectID + "','" + userID + "','" + dateTime + "','" + "Denied', '" + comments + "');"; //string updateIDSigned = "UPDATE 17agileteam6db.projects SET " + role + "_ID =" + userID + " WHERE project_ID = " + projectID; db.Update(updateSigned); db.Insert(historyQuery); //db.Update(updateIDSigned); }
void updateProject(string query) { DB db = new DB(); db.Update(query); }