Esempio n. 1
0
        public IApiResult DeleteMultiple(DeleteCategories operation)
        {
            var result = operation.ExecuteAsync().Result;

            if (result is ValidationsOutput)
            {
                return(new ApiResult <List <ValidationItem> >()
                {
                    Data = ((ValidationsOutput)result).Errors
                });
            }
            else
            {
                return(new ApiResult <object>()
                {
                    Status = ApiResult <object> .ApiStatus.Success
                });
            }
        }
Esempio n. 2
0
        public void CleanCategories(Office.IRibbonControl control)

        {
            DeleteCategories delete = new DeleteCategories();

            delete.ShowDialog();
            if (GlobalInfo.DeleteCategoriesConfirmation == DialogResult.OK)
            {
                MessageBox.Show("rsda");
                Data.Categories.DeleteAllOurCategoires(GlobalInfo.DeleteCategoriesDateStart, GlobalInfo.DeleteCategoriesDateFinish);
            }

            //  {
            //    DialogResult dr = MessageBox.Show("Do you want to clear all messages from our categories?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            //  if(dr == DialogResult.Yes)
            //{
            //  Data.Categories.DeleteAllOurCategoires(DateTime.Now.AddHours(-1));
            // }
        }