コード例 #1
0
        public List <BEComplejidad> fListaComplejidadDL(BEComplejidad objELComp)
        {
            List <BEComplejidad> objListaAct = new List <BEComplejidad>();

            try
            {
                cmdSQL.Connection  = NewConnection(ConfigurationManager.AppSettings[objELComp.DBConexion].ToString());
                cmdSQL.CommandType = CommandType.StoredProcedure;
                cmdSQL.Parameters.Clear();
                cmdSQL.CommandText = "USP_SAR_SEL_ListaComplejidadFilter";
                pAddParameter(cmdSQL, "@cComEliminado", objELComp.pcComEliminado == "" ? "" : objELComp.pcComEliminado, DbType.String);
                pAddParameter(cmdSQL, "@cComAbreviatura", objELComp.pcComAbreviatura == "" ? "" : objELComp.pcComAbreviatura, DbType.String);
                pAddParameter(cmdSQL, "@cComNombre", objELComp.pcComNombre == "" ? "" : objELComp.pcComNombre, DbType.String);
                pAddParameter(cmdSQL, "@nComId", objELComp.pnComId == 0 ? 0 : objELComp.pnComId, DbType.Int32);
                pAddParameter(cmdSQL, "@cOpcion", objELComp.pcOpcion == "" ? "00" : objELComp.pcOpcion, DbType.String);
                pAddParameter(cmdSQL, "@nPageNumber", objELComp.PageNumber == 0 ? 1 : objELComp.PageNumber, DbType.Int32);
                pAddParameter(cmdSQL, "@nPageZize", objELComp.PageSize == 0 ? 99999 : objELComp.PageSize, DbType.Int32);
                SqlDataReader drSQL = fLeer(cmdSQL);

                objListaAct = (List <BEComplejidad>)ConvertirDataReaderALista <BEComplejidad>(drSQL);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
            finally
            {
                if (cmdSQL.Connection.State == ConnectionState.Open)
                {
                    cmdSQL.Connection.Close();
                }
            }

            return(objListaAct);
        }
コード例 #2
0
ファイル: BLComplejidad.cs プロジェクト: Coquito1720/JOse
 public List <BEComplejidad> fListaComplejidadBL(BEComplejidad objBE)
 {
     return(objDA.fListaComplejidadDL(objBE));
 }