Beispiel #1
0
        public ActionResult CategoryInsert(int categoryId, string description, int companyId, int userId)
        {
            var newCategory = new DocumentCategory
            {
                Id          = categoryId,
                Description = description,
                CompanyId   = companyId,
                Editable    = true
            };

            var res = newCategory.Insert();

            if (res.Success)
            {
                Session["Company"] = new Company(companyId);
            }

            return(res);
        }