Пример #1
0
 public void Set(UpdateOperationViewModel model)
 {
     model.Operation  = CurrentOperation;
     model.IsEnabled  = IsEnabled(model) ?? false;
     model.Operations = Changes;
     model.BackLink   = GetBackLink();
     _tempData.Set(Changes);
 }
Пример #2
0
 public static void SetRedirectUrl(this TempDataDictionary TempData, string RedirectUrl)
 {
     TempData.Set(RedirectUrl);
 }
Пример #3
0
 public static void SetRegistrationModel(this TempDataDictionary TempData, RegistrationModel Model)
 {
     TempData.Set(Model);
 }
Пример #4
0
 public static void SetMessage(this TempDataDictionary TempData, string Message)
 {
     TempData.Set(Message);
 }
Пример #5
0
 public static void SetSuccess(this TempDataDictionary TempData, bool Success)
 {
     TempData.Set(Success);
 }
Пример #6
0
        /// <summary>
        /// Keep a value with a key for an additional request.
        /// </summary>
        /// <typeparam name="T">Value type.</typeparam>
        /// <param name="tempData">The TempData instance.</param>
        /// <param name="key">The key.</param>
        public static void Keep <T>(this TempDataDictionary tempData, string key)
        {
            T o = tempData.Get <T>(key);

            tempData.Set <T>(key, o);
        }
Пример #7
0
        /// <summary>
        /// Keep a value for an additional request.
        /// </summary>
        /// <typeparam name="T">Value type.</typeparam>
        /// <param name="tempData">The TempData instance.</param>
        public static void Keep <T>(this TempDataDictionary tempData)
        {
            T o = tempData.Get <T>();

            tempData.Set <T>(o);
        }