Beispiel #1
0
        public DataTable SearchCountWithPagination(NutrienteEntityPaged EntityPaged, NutrienteEntityFilter EntityFilter)
        {
            DbCommand storedProcCommand = this.DataBase.GetStoredProcCommand("Nutriente_SearchCountWithPagination");

            try
            {
                using (storedProcCommand)
                {
                    this.DataBase.AddInParameter(storedProcCommand, "PageSize", DbType.Int32, (object)EntityPaged.pageSize);
                    this.DataBase.AddInParameter(storedProcCommand, "PageReturn", DbType.Int32, (object)EntityPaged.pageReturn);
                    this.DataBase.AddInParameter(storedProcCommand, "WhereExtendido", DbType.String, (object)EntityFilter.WhereExtendido);
                    this.DataBase.AddInParameter(storedProcCommand, "OrdenDeRegistros", DbType.String, (object)EntityFilter.OrderBy);
                    this.DataBase.AddInParameter(storedProcCommand, "OpeNutrienteId", DbType.String, (object)ConvertirOperadores.ConvertirOperador(EntityFilter.OpeNutrienteId));
                    this.DataBase.AddInParameter(storedProcCommand, "NutrienteId", DbType.Int32, (object)EntityFilter.NutrienteId);
                    this.DataBase.AddInParameter(storedProcCommand, "OpeNombre", DbType.String, (object)ConvertirOperadores.ConvertirOperador(EntityFilter.OpeNombre));
                    this.DataBase.AddInParameter(storedProcCommand, "Nombre", DbType.AnsiString, (object)EntityFilter.Nombre);
                    this.DataBase.AddInParameter(storedProcCommand, "OpeUDMId", DbType.String, (object)ConvertirOperadores.ConvertirOperador(EntityFilter.OpeUDMId));
                    this.DataBase.AddInParameter(storedProcCommand, "UDMId", DbType.AnsiString, (object)EntityFilter.UDMId);
                    this.DataBase.AddInParameter(storedProcCommand, "OpePerteneceA", DbType.String, (object)ConvertirOperadores.ConvertirOperador(EntityFilter.OpePerteneceA));
                    this.DataBase.AddInParameter(storedProcCommand, "PerteneceA", DbType.Int32, (object)EntityFilter.PerteneceA);
                    this.DataBase.AddInParameter(storedProcCommand, "OpeEstado", DbType.String, (object)ConvertirOperadores.ConvertirOperador(EntityFilter.OpeEstado));
                    this.DataBase.AddInParameter(storedProcCommand, "Estado", DbType.AnsiString, (object)EntityFilter.Estado);
                    return(this.DataBase.ExecuteDataSet(storedProcCommand).Tables[0]);
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
 public DataTable SearchCountWithPagination(NutrienteEntityPaged EntityPaged, NutrienteEntityFilter EntityFilter)
 {
     try
     {
         return(this.CreateDataAccess().SearchCountWithPagination(EntityPaged, EntityFilter));
     }
     catch (Exception ex)
     {
         Helpers.Logger.Logger.LogExceptionStatic(ex);
         throw ex;
     }
 }