public void Edit(WorkflowUICommand element) { try { if (element == null) { throw new ArgumentNullException("element", "WorkflowUICommand can not be null"); } WorkflowUICommand obj = this.workflowuiCommands.Find(p => p.Guid == element.Guid); if (obj == null) { throw new ArgumentNullException("element", "WorkflowUICommand doesn't find"); } else { this.workflowuiCommands.Remove(obj); this.workflowuiCommands.Add(element); // TODO BASE DE DATOS } } catch (Exception ex) { throw new ArgumentNullException("element", "SecGroup exception in remove operation: " + ex.Message); } }
public void Add(WorkflowUICommand element) { try { if (element == null) { throw new ArgumentNullException("element", "WorkflowUICommand can not be null"); } this.workflowuiCommands.Add(element); // TODO BASE DE DATOS } catch (Exception ex) { throw new ArgumentNullException("element", "WorkflowUICommand exception in add operation: " + ex.Message); } }