Esempio n. 1
0
        public static List <EmployeeInfo> DisplayEmployeeBL()
        {
            List <EmployeeInfo> empList = new List <EmployeeInfo>();

            try
            {
                empList = Ems_Operations.DisplayEmployee();
                if (empList == null)
                {
                    throw new EmpException("No Employee Record Found");
                }
            }
            catch (EmpException e)
            { throw e; }

            return(empList);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="newemp"></param>
        /// <returns>bool</returns>
        public static bool AddEmployeeBL(EmployeeInfo newemp)
        {
            bool isAdded = false;

            try
            {
                if (ValidateEmployee(newemp))
                {
                    isAdded = Ems_Operations.AddEmployee(newemp);
                }
            }
            catch (EmpException ex)
            {
                throw ex;
            }
            return(isAdded);
        }