Ejemplo n.º 1
0
        public DataTable mostrar_Membresia(int tipo)
        {
            DB_Membresia daoMembresia = new DB_Membresia();
            DataTable    data         = daoMembresia.mostrarTipos(tipo);

            return(data);
        }
Ejemplo n.º 2
0
        public DataTable ddl_membresia_event(String value_men)
        {
            DB_Membresia DAO_Membresia = new DB_Membresia();
            //DDAOMembresia DAO_Membresia = new DDAOMembresia();
            DataTable Membresia = new DataTable();

            Membresia = DAO_Membresia.mostrarTipos(int.Parse(value_men));
            return(Membresia);
        }
Ejemplo n.º 3
0
        public U_AuxAumMemb page_load(bool post, Object Session, Object idEmpresa)
        {
            U_AuxAumMemb resp = new U_AuxAumMemb();

            if (!post)
            {
                if (Session == null)
                {
                    resp.Redirecion = "LoginUsr.aspx";
                    //Response.Redirect();
                }
                DataTable Empresa = (DataTable)Session;
                if (Empresa.Rows[0]["idTipo"].ToString() != "2")
                {
                    resp.Redirecion = "LoginUsr.aspx";
                    //Response.Redirect("LoginUsr.aspx");
                }

                DateTime Fecha = DateTime.Now.Date;
                resp.TB_FechaInicio1 = Fecha.ToShortDateString();
                Fecha = Fecha.AddMonths(1);
                resp.TB_FechaFinal1 = Fecha.ToShortDateString();
                //DDAOMembresia DAO_Membresia = new DDAOMembresia();
                DB_Membresia daoMembresia = new DB_Membresia();
                //AQUI HAY UN PROBLEMA CON EL TEMA DE LA MEMBRESIA NO OLVIDAR TENGO 1 MES!!
                DataTable Membresia = new DataTable();
                //DAO_Membresia.MostrarTipos(1);
                Membresia       = daoMembresia.mostrarTipos(1);
                resp.TB_Precio1 = "$" + Membresia.Rows[0]["Valor_mem"].ToString() + " COP";
                //VERIFICAR FUNCION IMPORTANTE
                //DAO_Membresia.MostrarActual(int.Parse(idEmpresa.ToString()));
                Membresia        = daoMembresia.MostrarActual(int.Parse(idEmpresa.ToString()));
                resp.TB_Inicial1 = Membresia.Rows[0]["Fecha_inicio"].ToString();
                resp.TB_Final1   = Membresia.Rows[0]["Fecha_fin"].ToString();
                resp.Redirecion  = "0";
                if (Membresia.Rows[0]["Estado_mem"].ToString().Equals("1"))
                {
                    resp.TB_Plan1 = "Activo";
                    //TB_Plan.Text = "Activo";
                }
                else
                {
                    resp.TB_Plan1 = "Vencida";
                    //TB_Plan.Text = "Vencida";
                }
                return(resp);
            }
            else
            {
                throw new ArgumentException("Valido");
            }
        }