public EECEmployee GetMobile(string empId)
        {
            var objReturn = new EECEmployee();

            using (var cn = new SqlConnection(ConnectionHelper.HRDBConnection()))
            {
                cn.Open();
                var cmd = cn.CreateCommand();
                cmd.CommandText = "SELECT Mobile FROM dbo.Employee_Info_Extended WHERE Emp_ID=@emp_id";
                cmd.Parameters.AddWithValue("@emp_id", empId);
                var dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    objReturn = new EECEmployee
                    {
                        mobile = dr["Mobile"].ToString()
                    };
                }
            }
            return(objReturn);
        }
        public ManagerCentre GetManagerCentreDetails(string id)
        {
            var objReturn             = new ManagerCentre();
            var listDirectReports     = new List <DirectReports>();
            var listSharesLineManager = new List <SharesLineManager>();

            try
            {
                int.Parse(id);

                var eecEmployee     = new EECEmployee();
                var employeeDetails = eecEmployee.GetEmployeeDetails(id).FirstOrDefault();

                var managerDetails = eecEmployee.GetEmployeeDetails(employeeDetails.line_Manager_No).FirstOrDefault();

                var directReports     = eecEmployee.GetDirectReports(id);
                var sharesLineManager = eecEmployee.GetSharesLineManager(employeeDetails.line_Manager_No);

                foreach (var items in directReports)
                {
                    listDirectReports.Add(new DirectReports
                    {
                        CostCenter     = items.cost_Center,
                        Department     = items.department,
                        EmployeeeID    = items.emp_ID,
                        Grade          = items.grade,
                        HireDate       = items.hiring_Date,
                        Name           = items.employee_Name_English,
                        NameArabic     = items.employee_Name_Arabic,
                        Position       = items.position,
                        PositionArabic = items.positionArabic,
                        UserPhoto      = items.imageByte
                    });
                }

                foreach (var items in sharesLineManager)
                {
                    listSharesLineManager.Add(new SharesLineManager
                    {
                        CostCenter     = items.cost_Center,
                        Department     = items.department,
                        EmployeeeID    = items.emp_ID,
                        Grade          = items.grade,
                        HireDate       = items.hiring_Date,
                        Name           = items.employee_Name_English,
                        NameArabic     = items.employee_Name_Arabic,
                        Position       = items.position,
                        PositionArabic = items.positionArabic,
                        UserPhoto      = items.imageByte
                    });
                }


                objReturn = new ManagerCentre
                {
                    Birthday        = employeeDetails.birth_Date,
                    CostCenter      = employeeDetails.cost_Center,
                    Department      = employeeDetails.department,
                    Email           = employeeDetails.e_Mail,
                    EmployeeeID     = employeeDetails.emp_ID,
                    Gender          = employeeDetails.gender,
                    Grade           = employeeDetails.grade,
                    HireDate        = employeeDetails.hiring_Date,
                    ManagerID       = employeeDetails.line_Manager_No,
                    ManagerName     = employeeDetails.line_Manager_Name,
                    ManagerPhoto    = managerDetails.imageByte,
                    ManagerPosition = managerDetails.position,
                    Mobile          = employeeDetails.mobile,
                    Name            = employeeDetails.employee_Name_English,
                    NameArabic      = employeeDetails.employee_Name_Arabic,
                    Nationality     = employeeDetails.nationality,
                    Position        = employeeDetails.position,
                    PositionArabic  = employeeDetails.positionArabic,
                    UserPhoto       = employeeDetails.imageByte,

                    DirectReports       = listDirectReports,
                    NoOfDirectorReports = listDirectReports.Count,
                    SharesLineManager   = listSharesLineManager,
                };
            }

            catch
            {
                objReturn = null;
            }

            return(objReturn);
        }