示例#1
0
        public Reporte_Mensual Traer_Reporte()
        {
            AccesoDatos     Datos = new AccesoDatos();
            Reporte_Mensual Rp    = new Reporte_Mensual();

            try
            {
                Datos.SettearSP("SP_ReporteMensual");

                Datos.EjecutarLector();

                Datos.Lector.Read();

                Rp.Mes             = Datos.Lector.GetInt32(0);
                Rp.Año             = Datos.Lector.GetInt32(1);
                Rp.Ventas_Mensual  = Datos.Lector.GetInt32(2);
                Rp.Envios_Mensual  = Datos.Lector.GetInt32(3);
                Rp.Retiros_Mensual = Datos.Lector.GetInt32(4);
                Rp.Total_Vendido   = Datos.Lector.GetInt32(5);

                return(Rp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session[Session.SessionID + "sesionAdmin"] != null)
            {
                BL_ReporteMensual neg_rp = new BL_ReporteMensual();

                rp = new Reporte_Mensual();

                rp = neg_rp.Traer_Reporte();

                usuario = new Usuario();
                usuario = (Usuario)(Session[Session.SessionID + "sesionAdmin"]);

                BL_MisCompras neg_miscompras = new BL_MisCompras();
                try
                {
                    LblAño.Text        = Convert.ToString(rp.Año);
                    LblMes.Text        = Convert.ToString(rp.Mes);
                    LblVentames.Text   = Convert.ToString(rp.Ventas_Mensual);
                    LblEnvios_mes.Text = Convert.ToString(rp.Envios_Mensual);
                    LblRetirosmes.Text = Convert.ToString(rp.Retiros_Mensual);
                    LblTotalmes.Text   = Convert.ToString(rp.Total_Vendido);



                    //if(!IsPostBack)
                    Listado_miscompras = neg_miscompras.Listado_General();
                    Session[Session.SessionID + "MisVentas"] = Listado_miscompras;

                    var VentaDetalle = Convert.ToInt32(Request.QueryString["idventa"]);
                    Session[Session.SessionID + "idventa"] = VentaDetalle;
                }
                catch (Exception ex)
                {
                    Session["Error" + Session.SessionID] = ex.Message;
                    Response.Redirect("Error");
                }
            }
            else
            {
                Response.Redirect("DefaultExpiroSesion");
            }
        }