예제 #1
0
        public string InsertCategory([Bind(Exclude = "Id")] Category Category)
        {
            string msg;

            if (ModelState.IsValid)
            {
                if (categoryBl.InsertCategory(Category) > 0)
                {
                    msg = "Data Inserted Successfully";
                }
                else
                {
                    msg = "Error. Could Not Insert Data";
                }
            }
            else
            {
                msg = "Sorry! Validation Error";
            }

            return(msg);
        }