Example #1
0
        //public static DataTable UpdateCompanyInfo()
        //{
        //    DataTable dt = new DataTable();
        //    SqlDataAdapter da = new SqlDataAdapter("SP_UpdateWorkExperience '" + request.Username + "','" + request.FatherLName + "','" + request.FatherFName + "','" + request.MotherLName + "','" + request.MotherFName + "','" + request.FatherContactNum + "','" + request.MotherContactNum + "','" + request.SiblingLName + "','" + request.SiblingFName + "','" + request.SiblingContactNum + "'", cs);
        //    da.Fill(dt);
        //    return dt;
        //}

        //public static void UpdatePassword(RequestUpdatePassword request)
        //{
        //    DataTable dt = new DataTable();
        //    SqlDataAdapter da = new SqlDataAdapter("SP_UpdatePassword " + request.UserID + ", " + request.Password, cs);
        //    da.Fill(dt);
        //}

        #endregion

        #region AuditTrail

        public static DataTable AuditTrail(RequestAuditTrail request)
        {
            DataTable      dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter("SP_AuditTrail '" + request.Username + "','" + request.Action + "'", cs);

            da.Fill(dt);
            return(dt);
        }
Example #2
0
        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);
        }
Example #3
0
        public static void UpdateSiblingInfo(RequestUpdateSiblingInfo request)
        {
            DataTable         dt           = new DataTable();
            SqlDataAdapter    da           = new SqlDataAdapter("SP_UpdateSiblingInfo '" + request.SiblingID + "','" + request.Username + "','" + request.SiblingLName + "','" + request.SiblingFName + "','" + request.SiblingContactNum + "'", cs);
            RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Sibling Information");

            DAT.AuditTrail(requestaudit);
            da.Fill(dt);
        }
Example #4
0
        public static void UpdateTimeChangeRequest(RequestUpdateTimeChangeRequest request)
        {
            DataTable         dt           = new DataTable();
            SqlDataAdapter    da           = new SqlDataAdapter("SP_UpdateTimeChangeRequest '" + request.RequestID + "','" + request.Username + "','" + request.DateApplied + "','" + request.AttendanceDateChange + "','" + request.TimeChangeIn + "','" + request.TimeChangeOut + "','" + request.Reason + "'", cs);
            RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Time Change Request");

            DAT.AuditTrail(requestaudit);
            da.Fill(dt);
        }
Example #5
0
        public static void UpdateLeaveRequest(RequestUpdateLeaveRequest request)
        {
            DataTable         dt           = new DataTable();
            SqlDataAdapter    da           = new SqlDataAdapter("SP_UpdateLeaveRequest '" + request.RequestID + "','" + request.Username + "','" + request.DateApplied + "','" + request.StartDate + "','" + request.EndDate + "','" + request.LeaveType + "','" + request.Reason + "'", cs);
            RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Leave Request");

            DAT.AuditTrail(requestaudit);
            da.Fill(dt);
        }
Example #6
0
        public static void UpdateFamilyInfo(RequestUpdateFamilyInfo request)
        {
            DataTable         dt           = new DataTable();
            SqlDataAdapter    da           = new SqlDataAdapter("SP_UpdateFamilyInfo '" + request.FamilyInfoID + "','" + request.Username + "','" + request.FatherLName + "','" + request.FatherFName + "','" + request.MotherLName + "','" + request.MotherFName + "','" + request.FatherContactNum + "','" + request.MotherContactNum + "'", cs);
            RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Family Information");

            DAT.AuditTrail(requestaudit);
            da.Fill(dt);
        }
Example #7
0
        public static void UpdateEducInfo(RequestUpdateEducationalInfo request)
        {
            DataTable         dt           = new DataTable();
            SqlDataAdapter    da           = new SqlDataAdapter("SP_UpdateEducInfo '" + request.EducInfoID + "','" + request.Username + "','" + request.School + "','" + request.Degree + "','" + request.Course + "','" + request.YearGraduated + "'", cs);
            RequestAuditTrail requestaudit = new RequestAuditTrail(request.Username, "Updated Educational Information");

            DAT.AuditTrail(requestaudit);
            da.Fill(dt);
        }
Example #8
0
        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);
        }
Example #9
0
        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);
        }
Example #10
0
        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);
        }
Example #11
0
        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);
        }
Example #12
0
        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);
        }
Example #13
0
        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);
        }
Example #14
0
        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);
        }
Example #15
0
        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);
        }
Example #16
0
        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);
        }
Example #17
0
        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);
        }
Example #18
0
        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);
        }