// All the employees excluding Test Administrator and HR
        public List <IEmployee> listemployee()
        {
            IEmployeeDB objEmployeeDB = EmployeeDBFactory.Create_EmployeeDB();

            EmployeeList = objEmployeeDB.getEmployees();
            return(EmployeeList);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="empName"></param>
        /// <param name="dob"></param>
        /// <param name="doj"></param>
        /// <param name="gender"></param>
        /// <param name="division"></param>
        /// <param name="ctc"></param>
        /// <param name="designation"></param>
        /// <param name="unitHeadId"></param>
        /// <param name="projectId"></param>
        /// <param name="isHr"></param>
        /// <param name="isNew"></param>
        /// <returns></returns>

        public int AddEmployee(string empName, DateTime dob, DateTime doj, string gender, string division, float ctc, string designation, int unitHeadId, int projectId, bool isHr, bool isNew)
        {
            IEmployee emp = new EmployeeFactory().CreateEmployee(empName, dob, doj, gender, division, ctc, designation, unitHeadId, projectId, isHr, isNew);

            IEmployeeDB edb = new EmployeeDBFactory().CreateEmployeeDB();

            return(edb.AddEmployee(emp));
        }
Beispiel #3
0
    public void populate_ddl()
    {
        IEmployeeDB      objEmployeeDB = EmployeeDBFactory.Create_EmployeeDB();
        List <IEmployee> lstEmployee   = objEmployeeDB.getEmployees();

        ddlemployees.Items.Clear();
        int inti = 0;

        ddlemployees.Items.Add("--select--");
        while (inti < lstEmployee.Count)
        {
            int      empid    = lstEmployee.ElementAt(inti).get_EmployeeID;
            ListItem ddl_list = new ListItem(Convert.ToString(empid), Convert.ToString(empid), true);

            ddlemployees.Items.Add(ddl_list);
            inti++;
        }
    }
        // To approve test administrator

        public List <ITestAdministrator> ApproveTestAdministrators(int intUserid)
        {
            List <ITestAdministrator> temp_testAdmin = new List <ITestAdministrator>();

            List <IEmployee> listtepemployee = new List <IEmployee>();
            IEmployeeDB      objempdb        = EmployeeDBFactory.Create_EmployeeDB();

            listtepemployee = objempdb.List_Employees();

            ITestAdministratorDB objTestAdministratorDB = TestAdministratorDBFactory.Create_TestAdminDB();

            temp_testAdmin = objTestAdministratorDB.getTestAdministrators();

            List <ITestAdministrator> objtemplist = new List <ITestAdministrator>();

            for (int i = 0; i < listtepemployee.Count; i++)
            {
                int t = 0;
                try
                {
                    t = Convert.ToInt32(listtepemployee.ElementAt(i).get_UnitHeadID);
                }
                catch (Exception)
                {
                    t = 0;
                }
                for (int j = 0; j < temp_testAdmin.Count; j++)
                {
                    if (t == intUserid && listtepemployee.ElementAt(i).get_EmployeeID == temp_testAdmin.ElementAt(j).get_EmployeeID)
                    {
                        if (temp_testAdmin.ElementAt(j).get_IsTestAdmin == false)
                        {
                            objtemplist.Add(temp_testAdmin.ElementAt(j));
                        }
                    }
                }
            }

            return(objtemplist);
        }
        // All the employees including Test Administrator and HR
        public List <IEmployee> ListOfEmployees()
        {
            IEmployeeDB objEmployeeDB = EmployeeDBFactory.Create_EmployeeDB();

            return(objEmployeeDB.List_Employees());
        }
Beispiel #6
0
        public IEmployee SelectEmployeeDetails(int employeeID, string password)
        {
            IEmployeeDB employee = EmployeeDBFactory.CreateEmployeeDB();

            return(employee.SelectEmployeeDetails(employeeID, password));
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public List <int> GetEmployeeIDList()
        {
            IEmployeeDB edb = new EmployeeDBFactory().CreateEmployeeDB();

            return(edb.GetEmployeeIDList());
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="empID"></param>
        /// <param name="ctc"></param>
        /// <param name="desigantion"></param>
        public void UpdateEmployee(int empID, float ctc, string desigantion)
        {
            IEmployeeDB edb = new EmployeeDBFactory().CreateEmployeeDB();

            edb.UpdateEmployee(empID, ctc, desigantion);
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>

        public SortedList <int, IEmployee> GetEmployeeList()
        {
            IEmployeeDB edb = new EmployeeDBFactory().CreateEmployeeDB();

            return(edb.GetEmpList());
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="empID"></param>
        /// <returns></returns>
        public int CheckHr(int empID)
        {
            IEmployeeDB edb = new EmployeeDBFactory().CreateEmployeeDB();

            return(edb.CheckHr(empID));
        }