Пример #1
0
        //Dispaly All Skill
        public static DataTable LoadCatSkill_BL()
        {
            DataTable cat = null;

            try
            {
                cat = Skill_DAL.LoadCategory();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (HRMSException ex)
            {
                throw ex;
            }
            return(cat);
        }
Пример #2
0
        //Dispaly All Skill
        public static DataTable DisplaySkill_BL()
        {
            DataTable skill = null;

            try
            {
                skill = Skill_DAL.DisplayAllSkills();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (HRMSException ex)
            {
                throw ex;
            }
            return(skill);
        }
Пример #3
0
        //Search Skill By Id
        public static DataTable SearchSkillById_BL(int Skillid)
        {
            DataTable skill = null;

            try
            {
                skill = Skill_DAL.SearchSkillById(Skillid);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (HRMSException ex)
            {
                throw ex;
            }
            return(skill);
        }
Пример #4
0
        //Delete Skill
        public static int DeleteSkill_BL(int Skillid)
        {
            int rowsAffected = 0;

            try
            {
                rowsAffected = Skill_DAL.DeleteSkill(Skillid);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (HRMSException ex)
            {
                throw ex;
            }
            return(rowsAffected);
        }
Пример #5
0
        //Get Autogenerated ID
        public static int GetAutogeneratedSkillID_BL()
        {
            int Skillid = 0;

            try
            {
                Skillid = Skill_DAL.GetAutoGeneratedSkillId();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (HRMSException ex)
            {
                throw ex;
            }
            return(Skillid);
        }
Пример #6
0
        //Calling Update Skill
        public static int UpdateSkill_BL(Skill newSkill)
        {
            int rowsAffected = 0;

            try
            {
                if (ValidatSkill(newSkill))
                {
                    rowsAffected = Skill_DAL.UpdateSkill(newSkill);
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (HRMSException ex)
            {
                throw ex;
            }
            return(rowsAffected);
        }