Пример #1
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");
            }
        }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            L_AumenMembre logi = new L_AumenMembre();
            U_AuxAumMemb  resp = logi.page_load(IsPostBack, Session["Sesion"], Session["idEmpresa"]);
            TB_FechaInicio.Text = resp.TB_FechaInicio1;
            TB_FechaFinal.Text  = resp.TB_FechaFinal1;
            TB_Precio.Text      = resp.TB_Precio1;
            TB_Inicial.Text     = resp.TB_Inicial1;
            TB_Final.Text       = resp.TB_Final1;
            TB_Plan.Text        = resp.TB_Plan1;

            //Seteando Idiomas
            L_Idioma  idiot      = new L_Idioma();
            Object    sesidioma  = Session["idiomases"];
            Int32     formulario = 23;
            Int32     idiom      = Convert.ToInt32(sesidioma);
            Hashtable compIdioma = new Hashtable();
            idiot.mostraridioma(formulario, idiom, compIdioma);
            try
            {
                this.H1_Mem.InnerText      = compIdioma["H1_Mem"].ToString();
                this.H4_Aum_Mem.InnerText  = compIdioma["H4_Aum_Mem"].ToString();
                this.H4_Pln_Act.InnerText  = compIdioma["H4_Pln_Act"].ToString();
                this.LB_Act_Date.InnerText = compIdioma["LB_Act_Date"].ToString();
                this.LB_End_Date.InnerText = compIdioma["LB_End_Date"].ToString();
                this.LB_Esta.InnerText     = compIdioma["LB_Esta"].ToString();
                this.LB_Tip.InnerText      = compIdioma["LB_Tip"].ToString();
                this.LB_New_In.InnerText   = compIdioma["LB_New_In"].ToString();
                this.LB_New_En.InnerText   = compIdioma["LB_New_En"].ToString();
                this.price.InnerText       = compIdioma["price"].ToString();
                this.BTN_Comprar.Text      = compIdioma["BTN_Comprar"].ToString();

                //this.respo.InnerText = compIdioma["respo"].ToString();
            }
            catch (Exception ex)
            { }
            Page.ClientScript.RegisterStartupScript(this.GetType(), "scr", "redireccionar('" + resp.Redirecion + "');", true);
        }catch (Exception er)
        {
            //NO HAGO NADA
        }
    }