예제 #1
0
        protected void UpdatedEmployeePersonal(Models.EmployeeModel employeeModel)
        {
            //Current UserId
            sqParam.Add(new SqlParameter("@Created_By", employeeModel.Current_UserID));

            // Personal details
            sqParam.Add(new SqlParameter("@UserId", employeeModel.UserID));
            sqParam.Add(new SqlParameter("@PhotoUrl", employeeModel.EmpImgURL));
            sqParam.Add(new SqlParameter("@FirstName", employeeModel.EmpFirstName));
            sqParam.Add(new SqlParameter("@MiddleName", employeeModel.EmpMiddleName));
            sqParam.Add(new SqlParameter("@LastName", employeeModel.EmpLastName));
            sqParam.Add(new SqlParameter("@Gender", employeeModel.EmpGender));
            sqParam.Add(new SqlParameter("@DOB", string.IsNullOrEmpty(employeeModel.EmpDOB.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpDOB)));
            sqParam.Add(new SqlParameter("@Marital_Status", employeeModel.EmpMaritalStatus));
            sqParam.Add(new SqlParameter("@MobileNo", employeeModel.EmpContact));
            sqParam.Add(new SqlParameter("@Emergency_ContactNo", employeeModel.EmpAltContact));
            sqParam.Add(new SqlParameter("@EmailId", employeeModel.EmpPersonalEmailID));
            sqParam.Add(new SqlParameter("@Religion", employeeModel.EmpReligion));
            sqParam.Add(new SqlParameter("@Nationality", employeeModel.EmpNationality));
            sqParam.Add(new SqlParameter("@Current_Address", employeeModel.EmpCurrentAddress));
            sqParam.Add(new SqlParameter("@Perm_Address", employeeModel.EmpPermanentAddress));
            sqParam.Add(new SqlParameter("@Perm_State", employeeModel.EmpState));
            sqParam.Add(new SqlParameter("@Perm_City", employeeModel.EmpCity));
            sqParam.Add(new SqlParameter("@Perm_Pincode", employeeModel.EmpPincode));
            sqParam.Add(new SqlParameter("@Bank_AccountNo", employeeModel.EmpBAN));
            sqParam.Add(new SqlParameter("@PAN_No", employeeModel.EmpPAN));
            sqParam.Add(new SqlParameter("@Adhar_No", employeeModel.EmpAdhaar));
        }
예제 #2
0
        protected void UpdatedEmployeePassport(Models.EmployeeModel employeeModel)
        {
            // Passport Details
            sqParam.Add(new SqlParameter("@PassportNo", employeeModel.EmpPassportNumber));
            sqParam.Add(new SqlParameter("@PlaceOfIssue", employeeModel.EmpPassportIssuePlace));
            sqParam.Add(new SqlParameter("@CountryOfIssue", employeeModel.EmpPassportIssueCountry));
            sqParam.Add(new SqlParameter("@DateOfIssue", string.IsNullOrEmpty(employeeModel.EmpPassportIssueDate.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpPassportIssueDate)));

            sqParam.Add(new SqlParameter("@DateOfExpiry", string.IsNullOrEmpty(employeeModel.EmpPassportExpiryDate.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpPassportExpiryDate)));
            sqParam.Add(new SqlParameter("@ECNR_Status", employeeModel.EmpECNRStatus));
        }
        public virtual void Setup()
        {
            // Lazy, TODO: Register globally
            AutoMapperConfig.RegisterMapping();

            // Create mock for HumanResourcesService
            mockHumanResourcesService = new Mock<IHumanResourcesService>();

            // Create new Employee object
            ceoBo = GetCeoEmployeeBo();
            ceoModel = GetCeoModel();
        }
예제 #4
0
        protected void UpdatedEmployeeProfessional(Models.EmployeeModel employeeModel)
        {
            // Professional details

            sqParam.Add(new SqlParameter("@DOJ", string.IsNullOrEmpty(employeeModel.EmpDOJ.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpDOJ)));
            sqParam.Add(new SqlParameter("@Department", employeeModel.EmpDepartment));
            sqParam.Add(new SqlParameter("@Designation", employeeModel.EmpDesignation));
            sqParam.Add(new SqlParameter("@Bond_Start_Date", string.IsNullOrEmpty(employeeModel.EmpBondStart.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpBondStart)));
            sqParam.Add(new SqlParameter("@Bond_End_Date", string.IsNullOrEmpty(employeeModel.EmpBondEnd.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpBondEnd)));
            sqParam.Add(new SqlParameter("@Official_Email_Id", employeeModel.EmpOrganizationEmailID));
            sqParam.Add(new SqlParameter("@Client_Id", employeeModel.EmpClientID));
            sqParam.Add(new SqlParameter("@ShiftTimeId", employeeModel.EmpShiftID));
            sqParam.Add(new SqlParameter("@ReportingManager_Id", employeeModel.EmpReportingManagerID));
            sqParam.Add(new SqlParameter("@Confirmation_Status", employeeModel.EmpIsConfirm));
            sqParam.Add(new SqlParameter("@Confirmation_Date", string.IsNullOrEmpty(employeeModel.EmpConfirmDate.ToString()) ? (object)DBNull.Value : Convert.ToDateTime(employeeModel.EmpConfirmDate)));
            sqParam.Add(new SqlParameter("@Background_VerificationCheck", employeeModel.EmpBackgroundVerification));
            sqParam.Add(new SqlParameter("@Address_Check", employeeModel.EmpAddressVerification));
            sqParam.Add(new SqlParameter("@Educational_Check", employeeModel.EmpEducationVerification));
            sqParam.Add(new SqlParameter("@Employment_Check", employeeModel.EmpEmploymentVerification));
        }
예제 #5
0
        public DataTable UpdateEmployeeDetails(Models.EmployeeModel employeeModel)
        {
            DataTable dt;

            //Update Employee Details
            try
            {
                UpdatedEmployeePersonal(employeeModel);
                UpdatedEmployeePassport(employeeModel);
                UpdatedEmployeeProfessional(employeeModel);

                dt = DAL.SQLHelp.ExecuteReader("Usp_UpdateEmployee", sqParam);
            }
            catch (Exception)
            {
                throw;
            }

            return(dt);
        }