コード例 #1
0
        public JsonResult submitEditNotesSort(int ParentID, string sortName, int Id, int type = 0)
        {
            try
            {
                var model = new Sys_NotesSort
                {
                    Id       = Id,
                    SortName = sortName,
                    Type     = type,
                    ParentID = ParentID,
                    IsDelete = 0,
                    TenantId = CurrentTenant.TenantId
                };

                if (Id > 0)
                {
                    _notesManager.UpdateNotesSort(model);
                }
                else
                {
                    _notesManager.AddNotesSort(model);
                }
                return(Json(new
                {
                    result = 1,
                    content = RetechWing.LanguageResources.Common.SaveSuccess + RetechWing.LanguageResources.Common.ExclamationMark
                }, JsonRequestBehavior.AllowGet));
            }
            catch
            {
                return(Json(new
                {
                    result = 0,
                    content = RetechWing.LanguageResources.Common.SaveFailed + RetechWing.LanguageResources.Common.ExclamationMark
                }, JsonRequestBehavior.AllowGet));
            }
        }