public static List <Observacion> List(FiltroOberservaciones f) { List <Observacion> resulList = new List <Observacion>(); try { ObservacionDS dataservice = new ObservacionDS(); DataSet listado = dataservice.List(f); if (listado.Tables.Count > 0) { foreach (DataRow d in listado.Tables[0].Rows) { Observacion o = new Observacion(-1); ORM(o, d); resulList.Add(o); } } } catch (Exception ex) { throw ex; } return(resulList); }
public static List <Observacion> ListByTicket(int idTicket) { FiltroOberservaciones f = new FiltroOberservaciones(); f.IDTicket = idTicket; f.OrderBY = " order by fecha desc"; return(List(f)); }
public override DataSet List(Filter f, out int RecordCount) { DataSet ds = new DataSet(); try { FiltroOberservaciones filtro = (FiltroOberservaciones)f; List <IDbDataParameter> paramList = new List <IDbDataParameter>(); DBRepository repository = DBRepository.GetDbRepository(); paramList.Add(repository.DbFactory.getDataParameter("P_ID", DbType.Int32, filtro.ID)); paramList.Add(repository.DbFactory.getDataParameter("P_IDOPERADOR", DbType.Int32, filtro.IDOperador)); paramList.Add(repository.DbFactory.getDataParameter("P_IDTICKET", DbType.Int32, filtro.IDTicket)); bool result = repository.ExecuteListProcedure(CONST_LIST_PROCEDURE_NAME, paramList, f, ds, out RecordCount); } catch (Exception ex) { throw ex; } return(ds); }