예제 #1
0
        public void EditCountableObjectAttribute(CountableObjectAttributes edittedAttribute)
        {
            var attribute = _context.CountableObjectAttributes.FirstOrDefault(c => c.Id == edittedAttribute.Id);

            attribute.Name = edittedAttribute.Name;
            _context.CountableObjectAttributes.Attach(attribute);
            _context.SaveChanges();
        }
예제 #2
0
        public IActionResult AddCntAttribute(CntAttributesEditModel model)
        {
            var cntAttribute = new CountableObjectAttributes()
            {
                Name = model.NewCntAttribute,
            };

            _userAdministration.AddCountableObjectAttribute(cntAttribute);

            TempData["Notification"] = "Izmjene su uspješno sačuvane";
            return(View("Parameters"));
        }
예제 #3
0
 public void AddCountableObjectAttribute(CountableObjectAttributes attribute)
 {
     _context.CountableObjectAttributes.Add(attribute);
     _context.SaveChanges();
 }