private void cbxvendedores_SelectedIndexChanged(object sender, EventArgs e)
        {
            pagoBL = new PagoBL();
            string dni = "";

            if (cbxvendedores.SelectedIndex != -1)
            {
                btnPagar.Enabled = true;
                dni = cbxvendedores.SelectedValue.ToString();
                dgvpagos.AutoGenerateColumns = false;
                dgvpagos.DataSource          = pagoBL.listarPagos(dni);

                double montototal = pagoBL.calcular_monto(pagoBL.listarPagos(dni));

                txtTotalComision.Text = montototal.ToString();
            }
        }
Exemple #2
0
        // GET: Pedido
        public ActionResult Index(CarritoCompra carrito)
        {
            if (carrito.Count == 0)
            {
                return(RedirectToAction("Index", "Home"));
            }
            var identity = (ClaimsPrincipal)Thread.CurrentPrincipal;
            var id       = identity.Claims.Where(c => c.Type == ClaimTypes.NameIdentifier)
                           .Select(c => c.Value).SingleOrDefault();
            var user            = new AccountBL().GetClienteById(Convert.ToInt32(id));
            var metodos         = new PagoBL().GetMetodoPagos();
            var pedidoViewModel = new PedidoViewModels()
            {
                cliente = user, metodoPago = metodos
            };

            return(View(pedidoViewModel));
        }