コード例 #1
0
        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);
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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);
                }
            }
        }