コード例 #1
0
        public DictionaryObject DictionaryObjEdit(DictionaryObjEdit obj)
        {
            var model = _context.DictionaryObjects.Where(m => m.DictionaryObjectId == obj.DictionaryObjID).FirstOrDefault();

            _context.Entry(model).Property(a => a.SubObj).CurrentValue               = obj.SubObj;
            _context.Entry(model).Property(a => a.DictionaryId).CurrentValue         = Int32.Parse(obj.DictionaryID);
            _context.Entry(model).Property(a => a.DictionaryObjectName).CurrentValue = obj.Name;
            _context.SaveChanges();

            return(model);
        }
コード例 #2
0
        public IActionResult DictionaryObjEdit(int ID)
        {
            var obj = _dictionaryService.GetDictionaryObject(ID);

            var model = new DictionaryObjEdit()
            {
                Dictionaries    = _dictionaryService.GetDictionariestList(),
                Name            = obj.DictionaryObjectName,
                SubObj          = obj.SubObj,
                DictionaryObjID = ID
            };

            return(View(model));
        }
コード例 #3
0
        public IActionResult DictionaryObjEdit(DictionaryObjEdit obj)
        {
            var dictObj = _dictionaryService.DictionaryObjEdit(obj);

            var model = new DictionaryObjEdit()
            {
                Dictionaries    = _dictionaryService.GetDictionariestList(),
                DictionaryID    = dictObj.DictionaryId.ToString(),
                DictionaryObjID = dictObj.DictionaryObjectId,
                Name            = dictObj.DictionaryObjectName,
                SubObj          = dictObj.SubObj
            };


            return(View(model));
        }