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 }); } }
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)); // } }