Skip to content

Commit

Permalink
#10 Executing single delete log request
Browse files Browse the repository at this point in the history
  • Loading branch information
shytikov committed Nov 7, 2016
1 parent 0e1a9bd commit 2236660
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Cinteros.XTB.PluginTraceViewer/PluginTraceViewer.cs
Expand Up @@ -519,10 +519,14 @@ private void deleteSelectedToolStripMenuItem_Click(object sender, EventArgs e)
{
var menu = (ContextMenuStrip)sender;
var grid = (CRMGridView)menu?.SourceControl;
var entities = grid?.SelectedCellRecords?.Entities;

if (grid?.SelectedCellRecords?.Entities?.Count == 1)
if (entities?.Count == 1)
{
// Execute one 'Delete' request
var entity = entities.FirstOrDefault();

Service.Delete(entity.LogicalName, entity.Id);
}
else
{
Expand Down

0 comments on commit 2236660

Please sign in to comment.