public static void UpdateContactInfo(RequestUpdateContactInfo request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_UpdateContactInfo '" + request.Username + "','" + request.HomeNum + "','" + request.CellphoneNum + "','" + request.HomeAddress + "','" + request.Email + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Contact Information"); DAT.AuditTrail(requestaudit); da.Fill(dt); }
public static void AddEducInfo(RequestAddEducInfo request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_AddEducInfo '" + request.Username + "','" + request.School + "','" + request.Degree + "','" + request.Course + "','" + request.YearGraduated + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Added School"); DAT.AuditTrail(requestaudit); da.Fill(dt); }
public static void AddSiblingInfo(RequestAddSiblingInfo request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_AddSiblingInfo '" + request.Username + "','" + request.SiblingLName + "','" + request.SiblingFName + "','" + request.SiblingContactNum + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Added New Sibling Information"); DAT.AuditTrail(requestaudit); da.Fill(dt); }
public static DataTable ActivateAccount(RequestActivateAccount request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_ActivateAccount '" + request.UserID + "'", cs); RequestAuditTrail RequestAudit = new RequestAuditTrail(request.Username, "Activated an Account"); DAT.AuditTrail(RequestAudit); da.Fill(dt); return(dt); }
public static DataTable ViewTimeChangeRequest(RequestViewTimeChangeRequest request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_ViewTimeChangeRequest '" + request.Username + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Viewed Time Change Request"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }
public static void VerifyRequest(RequestVerifyRequests request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_VerifyRequests '" + request.RequestID + "','" + request.UserID + "','" + request.Status + "','" + request.Remarks + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Verified Request"); DAT.AuditTrail(requestaudit); da.Fill(dt); }
public static DataTable UpdateWorkExperience(RequestUpdateWorkExperience request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_UpdateWorkExperience '" + request.WorkExperienceID + "','" + request.Username + "','" + request.YearStarted + "','" + request.YearEnded + "','" + request.Company + "','" + request.ExpPosition + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Work Experience"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }
public static DataTable ViewWorkExperience(RequestViewWorkExperience request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_ViewWorkExperience '" + request.Username + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Viewed Work Experience"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }
public static DataTable ViewCompanyInfo(RequestViewCompanyInfo request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_ViewCompanyInfo '" + request.Username + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Viewed Company Information"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }
public static void AddWorkExperience(RequestAddWorkExperience request) { string cs = "SERVER =localhost; DATABASE=EmployeePortal; Integrated Security=true;"; DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_AddWorkExperience '" + request.Username + "','" + request.YearStarted + "','" + request.YearEnded + "','" + request.Company + "','" + request.ExpPosition + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Added Work Experience"); DAT.AuditTrail(requestaudit); da.Fill(dt); }
public static DataTable AddUser(RequestAddUser request) { string password = ComputeHash(request.Password); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_AddEmployee '" + request.UsertypeID + "','" + request.LName + "','" + request.FName + "','" + request.MName + "','" + request.Nickname + "','" + request.DOB + "','" + request.CivilStatus + "','" + request.Gender + "','" + request.Username + "','" + password + "','" + request.DateTimeAdded + "','" + request.AccountStatus + "','" + request.UserStatus + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Added User"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }
public static DataTable SearchEmployees(RequestSearchEmployees request) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_SearchEmployees '" + request.Username + "%" + request.LName + "%" + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Searched Employee"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }
public static DataTable Login(RequestLogin request) { DataTable d2 = new DataTable(); string password = ComputeHash(request.Password); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SP_LoginUser '" + request.Username + "', '" + password + "'", cs); RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "LoggedIn"); DAT.AuditTrail(requestaudit); da.Fill(dt); return(dt); }