/// <summary> /// Called after the <see cref="Cancel"/> method is called. /// </summary> public virtual void OnCanceled(object sender, EditorSaveArgs <TModel> e) { }
private void EditorSaved(object sender, EditorSaveArgs <TModel> e) { ToastSuccess(); }
/// <summary> /// Called after the <see cref="Save"/> method is called. /// </summary> public virtual void OnSave(object sender, EditorSaveArgs <TModel> e) { }
/// <summary> /// Updates the collection base on save arguments /// </summary> /// <typeparam name="T"></typeparam> public static void Update <T>(this IList <T> collection, object sender, EditorSaveArgs <T> args) { collection.Update(args.OperationType, args.Item); }
/// <summary> /// Adds, edits or delete an item from a repository based on an editor save operation result <see cref="EditorSaveArgs{TModel}"/> /// </summary> /// <typeparam name="TModel">The model object Type</typeparam> /// <typeparam name="TKey">The model object key Type</typeparam> /// <param name="repo">The target repository</param> /// <param name="sender">the repository</param> /// <param name="args">The editor save arguments</param> public static void Update <TModel, TKey>(this ICRUDRepository <TModel, TKey> repo, object sender, EditorSaveArgs <TModel> args) where TModel : IUniqueObject <TKey> { repo.Update(args.OperationType, args.Item); }
/// <summary> /// Adds, edits or delete an item from a repository based on an editor save operation result <see cref="EditorSaveArgs{TModel}"/> /// </summary> /// <typeparam name="TModel">The model object Type</typeparam> /// <typeparam name="TKey">The model object key Type</typeparam> /// <param name="repo">The target repository</param> /// <param name="args">The editor save arguments</param> public static Task <TModel> Update <TModel, TKey>(this ICRUDRepository <TModel, TKey> repo, EditorSaveArgs <TModel> args) where TModel : IUniqueObject <TKey> { return(repo.Update(args.OperationType, args.Item)); }
private void CompanyEditorSaved(object sender, EditorSaveArgs <Company> e) { ToastSuccess(); }