コード例 #1
0
 internal static void SaveCategory(PetaPocoUnitOfWork unitOfWork, SecureSettingsCategory model)
 {
     if (!string.IsNullOrEmpty(model.Name))
     {
         try
         {
             unitOfWork.Database.Save(model);
         }
         catch (Exception ex)
         {
             LogHelper.Error<SecureSettingsCategory>(ex.Message, ex);
         }
     }
 }
コード例 #2
0
        public object SaveCategory(SecureSettingsCategory model)
        {
            SecureSettingsService.Instance.SaveCategory(model);

            return "Saved...";
        }
コード例 #3
0
        public object AddCategory(SecureSettingsCategory model)
        {
            SecureSettingsService.Instance.AddCategory(model.Name);

            return "Added...";
        }
コード例 #4
0
        public object RemoveCategory(SecureSettingsCategory model)
        {
            SecureSettingsService.Instance.RemoveCategory(model.Id);

            return true;
        }