public List <OptionList> RetrieveById(OptionList option) { try { if (dicListOptions.ContainsKey(option.ListId)) { return(dicListOptions[option.ListId]); } else { // //BUSCA EN OTRO MANAGER if (option.ListId.Equals("LST_CUSTOMER")) { var crudCustomer = new CustomerCrudFactory(); var lst = crudCustomer.RetrieveAll <Customer>(); var lstResult = new List <OptionList>(); foreach (var c in lst) { var newOption = new OptionList { ListId = option.ListId, Value = c.Id, Description = c.Name + " " + c.LastName }; lstResult.Add(newOption); } return(lstResult); } // //retrieve de monedas // //foreach creo los list option, con cada pojo de moneda } } catch (Exception ex) { ExceptionManager.GetInstance().Process(ex); } return(new List <OptionList>());; }
public List <Customer> RetrieveAll() { return(crudCustomer.RetrieveAll <Customer>()); }