示例#1
0
        public static bool AddCategory(CategoryBO categoryBO)
        {
            EarningAndDeductionsDAS earningAndDeductionsDAS = new EarningAndDeductionsDAS();
            int result = earningAndDeductionsDAS.AddNewCategory(categoryBO);

            return(result > 0);
        }
示例#2
0
        public static bool UpdateCategory(CategoryBO categoryBO)
        {
            EarningAndDeductionsDAS earningAndDeductionsDAS = new EarningAndDeductionsDAS();
            int numberOfRowImpacted = 0;

            numberOfRowImpacted = earningAndDeductionsDAS.UpdateCategory(categoryBO);
            return(numberOfRowImpacted > 0);
        }
示例#3
0
        public static List <CategoryBO> GetCategoryBOs()
        {
            EarningAndDeductionsDAS earningAndDeductionsDAS = new EarningAndDeductionsDAS();
            string            jsondata    = earningAndDeductionsDAS.GetAllCategories();
            List <CategoryBO> categoryBOs = new List <CategoryBO>();

            if (!jsondata.StartsWith("DB_ERROR"))
            {
                categoryBOs = StringUtil.DeserializeObjectFromJSON <List <CategoryBO> >(jsondata);
            }
            else
            {
                categoryBOs = null;
            }
            return(categoryBOs);
        }