public DataTable FiltrarDatos(string sNombreSP, string sNombreTabla, DataTable dtParametros,
                                      ref string sMsjError)
        {
            try
            {
                Cls_DataBase_BLL OBJ_DataBase_BLL = new Cls_DataBase_BLL();
                Cls_DataBase_DAL OBJ_DataBase_DAL = new Cls_DataBase_DAL();

                OBJ_DataBase_DAL.SSP_Nombre   = sNombreSP;
                OBJ_DataBase_DAL.SNombreTabla = sNombreTabla;

                OBJ_DataBase_BLL.Crear_Parametros(ref OBJ_DataBase_DAL);
                OBJ_DataBase_DAL.dt_Parametros = dtParametros;

                OBJ_DataBase_BLL.Execute_DataAdapter(ref OBJ_DataBase_DAL);

                if (OBJ_DataBase_DAL.SError == string.Empty)
                {
                    sMsjError = string.Empty;
                    return(OBJ_DataBase_DAL.OBJ_DataSet.Tables[0]);
                }
                else
                {
                    sMsjError = OBJ_DataBase_DAL.SError;
                    return(null);
                }
            }
            catch (Exception Error)
            {
                sMsjError = Error.Message.ToString();
                return(null);
            }
        }
Example #2
0
        public DataTable Listar_Polizas(ref string sMsjError)
        {
            Cls_DataBase_DAL Obj_DAL = new Cls_DataBase_DAL();
            Cls_DataBase_BLL Obj_BLL = new Cls_DataBase_BLL();

            Obj_DAL.sTableName = "Polizas";
            Obj_DAL.sSP_Name   = ConfigurationManager.AppSettings["Listar_Polizas"].ToString().Trim();
            Obj_BLL.Execute_DataAdapter(ref Obj_DAL);

            if (Obj_DAL.sMsjError == string.Empty)
            {
                sMsjError = string.Empty;
                return(Obj_DAL.Obj_DSet.Tables[0]);
            }
            else
            {
                sMsjError = Obj_DAL.sMsjError;
                return(null);
            }
        }
Example #3
0
        public DataTable Filtrar_Estados(ref string sMsjError, string sFiltro)
        {
            Cls_DataBase_DAL Obj_DAL = new Cls_DataBase_DAL();
            Cls_DataBase_BLL Obj_BLL = new Cls_DataBase_BLL();

            Obj_BLL.CrearParametros(ref Obj_DAL);
            Obj_DAL.DT_Parametros.Rows.Add("@Nombre", 3, sFiltro);

            Obj_DAL.sTableName = "Estados";
            Obj_DAL.sSP_Name   = ConfigurationManager.AppSettings["Filtrar_Estados"].ToString().Trim();
            Obj_BLL.Execute_DataAdapter(ref Obj_DAL);


            if (Obj_DAL.sMsjError == string.Empty)
            {
                sMsjError = string.Empty;
                return(Obj_DAL.Obj_DSet.Tables[0]);
            }
            else
            {
                sMsjError = Obj_DAL.sMsjError;
                return(null);
            }
        }