示例#1
0
        private void Btn_ropaOfer_Click(object sender, RoutedEventArgs e)
        {
            Oferta ofer = new MisOfertas.Negocio.Oferta();

            lboxOfertasConsu.ItemsSource = ofer.ListaFiltrada(4);
            lboxOfertasConsu.Items.Refresh();
        }
示例#2
0
        private void Btn_electronicaOfer_Click(object sender, RoutedEventArgs e)
        {
            Oferta ofer = new MisOfertas.Negocio.Oferta();

            lboxOfertasAdmi.ItemsSource = ofer.ListaFiltrada(2);
            lboxOfertasAdmi.Items.Refresh();
        }
示例#3
0
        private void Btn_todosOfer_Click(object sender, RoutedEventArgs e)
        {
            Oferta ofer = new MisOfertas.Negocio.Oferta();

            lboxOfertas.ItemsSource = ofer.ListaOferta();
            lboxOfertas.Items.Refresh();
        }
示例#4
0
        public PerfilConsumidor()
        {
            InitializeComponent();

            MisOfertas.Negocio.Producto pro  = new Producto();
            MisOfertas.Negocio.Oferta   Ofer = new MisOfertas.Negocio.Oferta();

            lboxProductosConsu.ItemsSource = pro.ListaProductos();
            lboxOfertasConsu.ItemsSource   = Ofer.ListaOferta();
        }
示例#5
0
        public MainWindow()
        {
            InitializeComponent();

            MisOfertas.Negocio.Producto pro  = new MisOfertas.Negocio.Producto();
            MisOfertas.Negocio.Oferta   Ofer = new MisOfertas.Negocio.Oferta();

            lboxProductos.ItemsSource = pro.ListaProductos();
            lboxOfertas.ItemsSource   = Ofer.ListaOferta();
        }
示例#6
0
        public PerfilAdministrador()
        {
            InitializeComponent();

            dp_fdesde.SelectedDate = DateTime.Today;

            MisOfertas.Negocio.Producto pro  = new Producto();
            MisOfertas.Negocio.Oferta   Ofer = new MisOfertas.Negocio.Oferta();

            lboxProductos.ItemsSource     = pro.ListaProductos(); //productos para Ralizar dscunto
            lboxProductosAdmi.ItemsSource = pro.ListaProductos(); //productos
            lboxOfertasAdmi.ItemsSource   = Ofer.ListaOferta();   //ofertas
        }
示例#7
0
        private async void Btn_confirmar_Click(object sender, RoutedEventArgs e)
        {
            if (txt_NomProduc.Text != string.Empty)
            {
                MisOfertas.Negocio.Oferta ofer = new MisOfertas.Negocio.Oferta()
                {
                    Idproducto   = idpro,
                    Descripcion  = descrip,
                    Porc_dscto   = Convert.ToDouble(txt_descuento.Text),
                    Fecha_desde  = DateTime.Today,
                    Fecha_Hasta  = (DateTime)dp_fhasta.SelectedDate,
                    Precio       = Precio,
                    PrecioOferta = Precio / 100 * (100 - Convert.ToDouble(txt_descuento.Text)),
                    Fotoproducto = Fotoproducto,
                };
                if (ofer.validaNuevaOferta(idpro))
                {
                    if (ofer.Create())
                    {
                        await this.ShowMessageAsync("AVISO", "La Oferta Fue Creada Exitosamente");

                        LimpiarOferta();
                    }
                    else
                    {
                        await this.ShowMessageAsync("ERROR", "La Oferta No Pude ser Creada");
                    }
                }
                else
                {
                    await this.ShowMessageAsync("ERROR", "El Producto ya tiene una Oferta Vigente");
                }
            }

            else
            {
                await this.ShowMessageAsync("ERROR", "Debes Seleccionar un Elemento de la lista para Continuar");
            }
        }