private List <attentioninareacomponentDto> InsertAttentionAreaComponent() { List <attentioninareacomponentDto> objwarehouseListAdd = new List <attentioninareacomponentDto>(); // Datos de Almacén foreach (var item in tvComponent.Nodes) { if (item.Checked == true) { attentioninareacomponentDto objattentioninareacomponent = new attentioninareacomponentDto(); objattentioninareacomponent.v_AttentionInAreaId = AttentionInAreaId; objattentioninareacomponent.v_ComponentId = item.NodeID; objwarehouseListAdd.Add(objattentioninareacomponent); } } return(objwarehouseListAdd.Count == 0 ? null : objwarehouseListAdd); }
private List <attentioninareacomponentDto> UpdateAttentionAreaComponent() { List <attentioninareacomponentDto> objwarehouseListUpdate = new List <attentioninareacomponentDto>(); foreach (var item in tvComponent.Nodes) { if (item.Checked) { if (item.CommandName != "1") { attentioninareacomponentDto objattentioninareacomponent = new attentioninareacomponentDto(); objattentioninareacomponent.v_AttentionInAreaId = AttentionInAreaId; objattentioninareacomponent.v_ComponentId = item.NodeID; objwarehouseListUpdate.Add(objattentioninareacomponent); } } } return(objwarehouseListUpdate.Count == 0 ? null : objwarehouseListUpdate); }