Exemplo n.º 1
0
        private void btnSeleccionarPez_Click(object sender, EventArgs e)
        {
            if (gridItems.Rows.Count < ControllerVentas.ITEMS_POR_FACTURA)
            {
                using (var form = new FormPeces(true))
                {
                    var result = form.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        pezAVender      = ControllerPeces.Instance.GetPezById(form.IdPezSeleccionado);
                        textboxPez.Text = pezAVender.GetNombre();

                        textboxMinorista.Text =
                            ManagerFormats.Instance.DecimalToMoney(pezAVender.GetPrecio().GetPrecioMinorista(), true);
                        textboxMayorista.Text =
                            ManagerFormats.Instance.DecimalToMoney(pezAVender.GetPrecio().GetPrecioMayorista(), true);
                        textboxOferta.Text =
                            ManagerFormats.Instance.DecimalToMoney(pezAVender.GetPrecio().GetPrecioOferta(), true);
                        textboxDistribuidor.Text =
                            ManagerFormats.Instance.DecimalToMoney(pezAVender.GetPrecio().GetPrecioDistribuidor(), true);
                    }
                }
            }
            else
            {
                ManagerMessages.Instance.NewInformationMessage(this, "Máximo de items por factura alcanzado. Para facturar más items, genere otra venta.");
            }
        }
Exemplo n.º 2
0
 private void btnSeleccionarPez_Click(object sender, EventArgs e)
 {
     using (var form = new FormPeces(true))
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             pezAComprar     = ControllerPeces.Instance.GetPezById(form.IdPezSeleccionado);
             textboxPez.Text = pezAComprar.GetNombre();
         }
     }
 }