Exemplo n.º 1
0
 public DataTable cantidadVentaAnio()
 {
     using (ServicioVenta comp = new ServicioVenta())
     {
         return(comp.numeroVentaAnio());
     }
 }
Exemplo n.º 2
0
 public DataSet ultimaVenta()
 {
     using (ServicioVenta comp = new ServicioVenta())
     {
         return(comp.ultimaVenta());
     }
 }
Exemplo n.º 3
0
        public string InsertarDetalleVenta(int id_venta, string codigo, int cantidad, double precio, double subtotal, string estado)
        {
            Venta nuevaVenta = new Venta(id_venta, codigo, cantidad, precio, subtotal, estado);

            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.InsertarDetalleVenta(nuevaVenta));
        }
Exemplo n.º 4
0
 public FormPrincipal()
 {
     InitializeComponent();
     this.sa = new ServicioArticulo();
     this.sd = new ServicioDependiente();
     this.sv = new ServicioVenta();
 }
Exemplo n.º 5
0
 public DataTable productoAnio()
 {
     using (ServicioVenta comp = new ServicioVenta())
     {
         return(comp.productoAnio());
     }
 }
Exemplo n.º 6
0
        public string InsertarVenta(int id_cliente, int id_usuario, string fecha, int modo_pago, double saldo, string estado)
        {
            Venta nuevaVenta = new Venta(id_cliente, id_usuario, fecha, modo_pago, saldo, estado);

            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.InsertarVenta(nuevaVenta));
        }
Exemplo n.º 7
0
        //public string InsertarDetalleVenta(int id_venta, string codigo, int cantidad, double precio, double subtotal, string estado)
        //{
        //    Venta nuevaVenta = new Venta(id_venta, codigo, cantidad, precio, subtotal, estado);
        //    using (ServicioVenta elVenta = new ServicioVenta())
        //        return elVenta.InsertarDetalleVenta(nuevaVenta);
        //}

        public string ModifyBill(int id_Venta, int id_cliente, string fecha, string details, Double price, Double amount)
        {
            Venta Venta = new Venta(id_Venta, id_cliente, fecha, details, price, amount);

            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.ModifyBill(Venta));
        }
Exemplo n.º 8
0
        public string InsertarVenta(int Id_Cliente, DateTime Fecha_Venta)
        {
            Venta nuevaVenta = new Venta(Id_Cliente, Fecha_Venta);

            using (ServicioVenta laVenta = new ServicioVenta())
                return(laVenta.ingresarVenta(nuevaVenta));
        }
Exemplo n.º 9
0
        public string InsertNewSaveBills(int id_customer, string fecha, int bill)
        {
            Venta nuevaVenta = new Venta(id_customer, fecha, bill);

            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.InsertNewSaveBills(nuevaVenta));
        }
Exemplo n.º 10
0
        public string InsertarNewVenta(int id_customer, int id_usuario, string fecha, string detalle)
        {
            Venta nuevaVenta = new Venta(id_customer, id_usuario, fecha, detalle);

            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.InsertarNewVenta(nuevaVenta));
        }
Exemplo n.º 11
0
        public string InsertarVenta(int id_bill, string fecha, string detalle, double saldo, double total)
        {
            Venta nuevaVenta = new Venta(id_bill, fecha, detalle, saldo, total);

            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.InsertarVenta(nuevaVenta));
        }
Exemplo n.º 12
0
 public FormVentas(String cadena, String codigo, ServicioArticulo sa, ServicioVenta sv, ServicioDependiente sd)
 {
     InitializeComponent();
     this.Text = cadena + this.Text;
     this.sa   = sa;
     this.sv   = sv;
     this.sd   = sd;
     this.v    = new VentaContado(codigo, null);
 }
Exemplo n.º 13
0
        //private void CerrarToolStripButton_Click(object sender, EventArgs e)
        //{
        //    Close();
        //}



        private void FrmVentas_Load_1(object sender, EventArgs e)
        {
            try
            {
                _servicio = new ServicioVenta();
                _lista    = _servicio.GetLista();
                MostrarEnGrilla();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemplo n.º 14
0
 public FormVentaArticulo(ServicioArticulo sa, ServicioVenta sv)
 {
     InitializeComponent();
     this.bs                     = new BindingSource();
     this.bs2                    = new BindingSource();
     this.sa                     = sa;
     this.sv                     = sv;
     this.listado                = sa.DatosCatalogoTienda().ToList();
     this.bs.DataSource          = this.listado;
     this.listBox1.DataSource    = this.bs;
     this.listBox1.DisplayMember = "codigo";
     limpiarCuadros();
 }
Exemplo n.º 15
0
        public FormDataGridViewVenta(List <Venta> lv, ServicioVenta sv)
        {
            InitializeComponent();
            this.sv      = sv;
            this.listado = lv;
            this.dataGridView1.Columns.Add("Código", "Código");
            this.dataGridView1.Columns.Add("Dependiente", "Dependiente");
            this.dataGridView1.Columns.Add("Fecha de venta", "Fecha de venta");
            this.dataGridView1.Columns.Add("Tarjeta", "Tarjeta");
            foreach (Venta v in this.listado)
            {
                VentaTarjeta vtaux = v as VentaTarjeta;
                string[]     row   = new string[] { v.Codigo, v.Dependiente.NSS, v.FechaVenta.ToString(), vtaux == null ? "No tarjeta" : vtaux.NumTarjeta };
                this.dataGridView1.Rows.Add(row);
            }
            if (this.dataGridView1.Rows.Count == 1)
            {
                this.dataGridView1.Rows.RemoveAt(this.dataGridView1.Rows.Count);

                this.dataGridView1.ClearSelection();
            }
        }
Exemplo n.º 16
0
        //public string ModificarVenta(int id_Venta, int id_cliente, string fecha, int id_usuario, int modo_pago, string estado)
        //{
        //    Venta modificarVenta = new Venta(id_Venta, id_cliente, id_usuario, fecha, modo_pago, estado);
        //    using (ServicioVenta elVenta = new ServicioVenta())
        //        return elVenta.ModificarVenta(modificarVenta);
        //}

        /// <summary>
        /// Metodo Consultar Venta
        /// </summary>
        /// <param name="id_Venta"></param>
        /// <returns></returns>
        public DataSet ConsultarVenta(int id_Venta)
        {
            using (ServicioVenta elVenta = new ServicioVenta())
                return(elVenta.ConsultarVenta(id_Venta));
        }
Exemplo n.º 17
0
 /// <summary>
 /// Metodo Consultar Venta
 /// </summary>
 /// <param name="id_Venta"></param>
 /// <returns></returns>
 public DataTable ConsultarVenta(int id_cliente, int last_id)
 {
     using (ServicioVenta elVenta = new ServicioVenta())
         return(elVenta.ConsultarVenta(id_cliente, last_id));
 }
Exemplo n.º 18
0
 /// <summary>
 /// Metodo ConsultarUltimoVenta
 /// </summary>
 /// <returns></returns>
 public DataSet ConsultarUltimoVenta()
 {
     using (ServicioVenta elVenta = new ServicioVenta())
         return(elVenta.ConsultarUltimoVenta());
 }
Exemplo n.º 19
0
 public DataTable ConsultarVentaE(int id_bill)
 {
     using (ServicioVenta elVenta = new ServicioVenta())
         return(elVenta.ConsultarVentaE(id_bill));
 }
Exemplo n.º 20
0
 /// <summary>
 /// Metodo Listar Ventas
 /// </summary>
 /// <returns></returns>
 public DataTable ListarVentas()
 {
     using (ServicioVenta elVenta = new ServicioVenta())
         return(elVenta.ListarVentas());
 }