public override EventResult Material_OnAfterNew(IMaterial material) { bool callResult = true; if (!_materialMethods.CheckIfAllowedMaterial(material)) { _functionLib.ShowMsg(ExtensionSettings.UI_MSG_MATERIALAMOUNTERR); return(EventResult.Cancel); } else { callResult = _materialMethods.UpdateArticleQuantity(material); } return(EventResult.Success); }
public override void OnDeleting(IMaterial material) { Mobigo.Core.Diagnostics.Console.Log("On Deleting material"); if (_materialMethods.CheckIfAllowedMaterial(material)) { Mobigo.Core.Diagnostics.Console.Log("delete material allowed"); _materialMethods.UpdateArticleQuantity(material); } }
public override void OnDeleting(ITask task) { IMaterialList materialList = task.GetMaterials(_materialStore); Mobigo.Core.Diagnostics.Console.Log("On Deleting Task"); foreach (IMaterial mat in materialList) { if (_materialMethods.CheckIfAllowedMaterial(mat)) { _materialMethods.UpdateArticleQuantity(mat); } } }