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