Exemple #1
0
        public string Update(string previousName, string presentName)
        {
            SetupCategoryGateway setupCategoryGateway = new SetupCategoryGateway();
            int row = setupCategoryGateway.Update(previousName, presentName);

            if (row > 0)
            {
                return("Updated");
            }
            else
            {
                return("Failed");
            }
        }
Exemple #2
0
        public string AddCategory(String categoryName)
        {
            SetupCategoryGateway setupCategoryGateway = new SetupCategoryGateway();
            int row = setupCategoryGateway.AddCategory(categoryName);

            if (row == -1)
            {
                return("Same Category already Exist or Any Error Occurs");
            }
            else if (row > 0)
            {
                return("Saved");
            }
            else
            {
                return("Not Saved");
            }
        }
Exemple #3
0
        public List <Category> GetAllData()
        {
            SetupCategoryGateway setupCategoryGateway = new SetupCategoryGateway();

            return(setupCategoryGateway.GetAllData());
        }