Exemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string        typeName = context.Request["typeName"];
            CategoriesBll Bll      = new CategoriesBll();
            Categories    ca       = new Categories();

            ca.Name = typeName;
            int caa = Bll.Add(ca);

            if (caa > 0)
            {
                context.Response.Write("ok");
            }
        }
        public string AddNewCategory(string catName)
        {
            var id = CategoriesBll.Add(catName);

            return(id);
        }