예제 #1
0
        //Returns a string that displays a customer's properties
        public override string ToString()
        {
            string strOutput = "";

            strOutput += "RESERVATION DETAILS" + Environment.NewLine +
                         "Check in date: " + CheckInDate.ToLongDateString() + Environment.NewLine +
                         "Number of nights: " + NumberOfNights.ToString() + Environment.NewLine +
                         "Room type: " + RoomType + Environment.NewLine +
                         "Number of rooms: " + NumberOfRooms.ToString() + Environment.NewLine +
                         "Room price: " + RoomPrice.ToString("C2") + Environment.NewLine +
                         "Subtotal: " + SubTotal.ToString("C2") + Environment.NewLine +
                         "Tax (7%): " + Tax.ToString("C2") + Environment.NewLine +
                         "Convenience Fee: " + ConvenienceFee.ToString("C2") + Environment.NewLine +
                         "Total: " + Total.ToString("C2") + Environment.NewLine +
                         Environment.NewLine +
                         "CUSTOMER DETAILS" + Environment.NewLine +
                         "First Name: " + FirstName + Environment.NewLine +
                         "Last Name: " + LastName + Environment.NewLine +
                         "Credit Card Number: " + CreditCardNumber + Environment.NewLine +
                         "Credit Card Type: " + CreditCardType + Environment.NewLine +
                         "Phone: " + Phone + Environment.NewLine +
                         "Email: " + Email + Environment.NewLine;

            return(strOutput);
        }
예제 #2
0
        private void btnRemoveItem_Click(object sender, EventArgs e)
        {
            if (lstOrder.Items.Count != 0)
            {
                foreach (ListViewItem lvItem in lstOrder.SelectedItems)
                {
                    double SubTotal;
                    double Total;

                    String Price = lvItem.SubItems[1].Text;
                    SubTotal         = System.Convert.ToDouble(txtSubTotal.Text);
                    Total            = System.Convert.ToDouble(txtTotal.Text);
                    SubTotal         = SubTotal - Convert.ToDouble(Price);
                    txtSubTotal.Text = SubTotal.ToString();
                    txtVATAdded.Text = ((SubTotal / 100) * 20).ToString();
                    double VATPrice = Convert.ToDouble(txtVATAdded.Text);
                    Total         = (SubTotal + VATPrice);
                    txtTotal.Text = Total.ToString();
                    lstOrder.Items.Remove(lvItem);
                }
            }
            else
            {
                MessageBox.Show("No Items");
            }
        }
예제 #3
0
        private void PolpulatePaymentInfo()
        {
            this.SubTotal = 0;
            foreach (DataGridViewRow item in dgvSalesInfo.Rows)
            {
                if (item.Cells[8].Value != null)
                {
                    SubTotal += int.Parse(item.Cells[8].Value.ToString());
                }
            }

            txtAmount.Text = SubTotal.ToString();
            int taxAmt = this.clsPOS.SEL_Tax();
            int scAmt  = this.clsPOS.SEL_ServiceCharges();

            ServiceCharnge = scAmt;

            long tax = (SubTotal / 100) * taxAmt;

            Tax         = int.Parse(tax.ToString());
            txtTax.Text = Tax.ToString();

            txtServiceCharges.Text = scAmt.ToString();

            GrandTotal = SubTotal + Tax + ServiceCharnge;

            txtTotal.Text = GrandTotal.ToString();
        }
예제 #4
0
 public void DisplayTotal()
 {
     Console.WriteLine("Subtotal: " + SubTotal.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("Tax: " + Tax.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("Grand Total: " + GrandTotal.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("-".PadRight(100, '-'));
 }
예제 #5
0
        public override string ToString()
        {//Override the default tostring method for use in dispalying confirmation message and for the member information search page
            string strResults = "Type: " + Type + Environment.NewLine;

            strResults += "First Name: " + FirstName + Environment.NewLine;
            strResults += "Last Name: " + LastName + Environment.NewLine;
            strResults += "Start Date: " + StartDate + Environment.NewLine;
            strResults += "End Date: " + EndDate + Environment.NewLine;
            strResults += "Sub Total: " + SubTotal.ToString("C2") + Environment.NewLine;
            strResults += "Training: " + Additional_Features_Training + Environment.NewLine;
            strResults += "Locker Rental: " + Additional_Features_LockerRental + Environment.NewLine;
            strResults += "Total Cost: " + TotalCost.ToString("C2") + Environment.NewLine;
            strResults += "Phone Number: (" + PhoneNumber.Substring(0, 3) + ")" + "-" + PhoneNumber.Substring(3, 3) + "-" + PhoneNumber.Substring(6, 4) + Environment.NewLine;
            strResults += "Email: " + Email + Environment.NewLine;
            strResults += "Gender: " + Gender + Environment.NewLine;
            strResults += "Age: " + Age.ToString() + " Years old" + Environment.NewLine;
            strResults += "Weight: " + Weight.ToString() + "lbs" + Environment.NewLine;
            strResults += "Credit Card Type: " + Credit_Card_Type + Environment.NewLine;
            strResults += "Credit Card Number: " + Credit_Card_Number + Environment.NewLine;
            strResults += "Athletic Performance: " + PFG_AthleticPerformance + Environment.NewLine;
            strResults += "Overall Health: " + PFG_OverallHealth + Environment.NewLine;
            strResults += "Strength Training: " + PFG_StrengthTraining + Environment.NewLine;
            strResults += "Weight Loss: " + PFG_WeightManagment + Environment.NewLine;
            strResults += Environment.NewLine;
            return(strResults);
        }
예제 #6
0
        public void PrintCheckReceipt(List <Product> orderItems, Check check)
        {
            foreach (var item in orderItems)
            {
                Console.WriteLine("{0,-30} {1,5}", item.Name, $"${item.Price}");
            }
            Console.WriteLine("{0,-30} {1,5}", "Subtotal:", SubTotal.ToString("C", CultureInfo.CurrentCulture));
            Console.WriteLine("{0,-30} {1,5}", "Sales Tax:", SalesTax.ToString("C", CultureInfo.CurrentCulture));
            Console.WriteLine("{0,-30} {1,5}", "Grand Total:", GrandTotal.ToString("C", CultureInfo.CurrentCulture));
            Console.WriteLine("{0,-30} {1,5}", "Check Payment - Tender Amount:", GrandTotal.ToString("C", CultureInfo.CurrentCulture));
            Console.Write("Account Number: ");
            var checkNum = check.CheckNumber.ToCharArray();

            for (int i = 0; i < checkNum.Length; i++)
            {
                if (i < checkNum.Length - 4)
                {
                    Console.Write("x");
                }
                else
                {
                    Console.Write(checkNum[i]);
                }
            }
        }
예제 #7
0
        //Devuelve una cadena que muestra las propiedades de un cliente
        public override string ToString()
        {
            string strOutput = "";

            strOutput += "DETALLES DE RESERVA" + Environment.NewLine +
                         "Fecha de entrada: " + CheckInDate.ToLongDateString() + Environment.NewLine +
                         "Numero de noches: " + NumberOfNights.ToString() + Environment.NewLine +
                         "Tipo de cuarto: " + RoomType + Environment.NewLine +
                         "Numero de cuartos: " + NumberOfRooms.ToString() + Environment.NewLine +
                         "Precio de cuarto: " + RoomPrice.ToString("C2") + Environment.NewLine +
                         "Subtotal: " + SubTotal.ToString("C2") + Environment.NewLine +
                         "Iva (19%): " + Tax.ToString("C2") + Environment.NewLine +
                         "Gravamen de Hospedaje: " + ConvenienceFee.ToString("C2") + Environment.NewLine +
                         "Total: " + Total.ToString("C2") + Environment.NewLine +
                         Environment.NewLine +
                         "DETALLES DE CLIENTE" + Environment.NewLine +
                         "Nombres: " + FirstName + Environment.NewLine +
                         "Apellidos: " + LastName + Environment.NewLine +
                         "Numero de TDC: " + CreditCardNumber + Environment.NewLine +
                         "Tipo de tarjeta: " + CreditCardType + Environment.NewLine +
                         "Telefono: " + Phone + Environment.NewLine +
                         "Email: " + Email + Environment.NewLine;

            return(strOutput);
        }
        private void btnFilter_Click(object sender, EventArgs e)
        {
            if (uvValidar.Validate(true, false).IsValid)
            {
                var id2 = cbCustomerOrganization.SelectedValue.ToString().Split('|');

                frmBuscarServicioPendiente frm = new frmBuscarServicioPendiente(id2[0], id2[1]);
                frm.ShowDialog();

                if (frm.DialogResult == System.Windows.Forms.DialogResult.Cancel)
                {
                    return;
                }

                if (frm._ListaFacturacionList == null)
                {
                    return;
                }

                _ListaFacturacionDetalle = frm._ListaFacturacionList;
                DateTime?FechaInicio = frm._FechaInicio;
                DateTime?FechaFin    = frm._FechaFin;

                var Result = oFacturacionBL.LlenarGrillaSigesfot("", id2[0], id2[1], FechaInicio.Value.Date, FechaFin.Value.Date, -1);

                _EmpresaCliente = id2[0];
                _EmpresaSede    = id2[1];
                _FechaInicio    = FechaInicio.Value.Date;
                _FechaFin       = FechaFin.Value.Date;

                double Total = double.Parse(Result.Sum(p => p.Total).ToString());
                double Igv;
                double SubTotal;

                if (Total > 700)
                {
                    txtDetraccion.Text = (Total * 0.1).ToString();
                }
                else
                {
                    txtDetraccion.Text = "0.00";
                }

                Igv      = (Total * 1.18) - Total;
                SubTotal = Total - Igv;

                txtTotalFacturar.Text = Total.ToString();
                txtIgv.Text           = Igv.ToString();
                txtSubTotal.Text      = SubTotal.ToString();
                grdData.DataSource    = _ListaFacturacionDetalle;
            }
            else
            {
                MessageBox.Show("Por favor corrija la información ingresada. Vea los indicadores de error.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
예제 #9
0
 public void PrintOrderTotals(List <Product> orderList)
 {
     CalcualateSubtotal(orderList);
     CalculateGrandTotal();
     CalculateSalesTax();
     Console.WriteLine("\n\nTotal");
     Console.WriteLine("{0,-30} {1,5}", "Subtotal:", SubTotal.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("{0,-30} {1,5}", "Sales Tax:", SalesTax.ToString("C", CultureInfo.CurrentCulture));;
     Console.WriteLine("{0,-30} {1,5}", "Grand Total:", GrandTotal.ToString("C", CultureInfo.CurrentCulture));
 }
예제 #10
0
        public string GetReceipt()
        {
            string output = ToString();

            output += "==================\n";
            output += $"subtotal: {SubTotal.ToString("C")}\n";
            output += $"  6% Tax: {Tax.ToString("C")}\n";
            output += $"   Total: {Total.ToString("C")}\n";

            return(output);
        }
예제 #11
0
 public void PrintCashReceipt(List <Product> orderItems, Cash cash)
 {
     foreach (var item in orderItems)
     {
         Console.WriteLine("{0,-30} {1,5}", item.Name, $"${item.Price}");
     }
     Console.WriteLine("{0,-30} {1,5}", "Subtotal:", SubTotal.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("{0,-30} {1,5}", "Sales Tax:", SalesTax.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("{0,-30} {1,5}", "Grand Total:", GrandTotal.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("{0,-30} {1,5}", "Amount Tendered:", cash.AmountGiven.ToString("C", CultureInfo.CurrentCulture));
     Console.WriteLine("{0,-30} {1,5}", "Change:", cash.Change.ToString("C", CultureInfo.CurrentCulture));
 }
예제 #12
0
        private void PolpulatePaymentInfo()
        {
            this.SubTotal = 0;

            foreach (DataGridViewRow item in dgvProductInfo.Rows)
            {
                if (item.Cells[6].Value != null)
                {
                    SubTotal += long.Parse(item.Cells[6].Value.ToString());
                }
            }
            //SubTotal = SubTotal - subtotalfirst;
            txtTotal.Text = SubTotal.ToString();
        }
예제 #13
0
        /// <summary>
        /// Here is the *MAGIC TRICK* !
        /// Rather than attempting align parameters via string formats - we use
        /// MAGIC STRINGS that no one in their right mind would ever use; defined
        /// from the ReceiptPieces class.
        ///
        /// The conundrum to this approach is ; Any data extracted for receipts
        /// must be 1) Labeled in ReceiptPieces and 2) Addressed to proper assignment
        /// here.
        /// </summary>
        /// <param name="input"></param>
        /// <param name="line"></param>
        /// <returns></returns>
        private string ProcessReceiptFormat(string input, Line line = null)
        {
            string output = input.Replace(ReceiptPieces.Company, Company);

            if (line != null)
            {
                output = output.Replace(ReceiptPieces.LinePrice, line.Bike.DiscountMarker.discount(line.Quantity).ToString("C"));
                output = output.Replace(ReceiptPieces.LineQuantity, line.Quantity.ToString());
                output = output.Replace(ReceiptPieces.BikeBrand, line.Bike.Brand);
                output = output.Replace(ReceiptPieces.BikeModel, line.Bike.Model);
            }

            output = output.Replace(ReceiptPieces.Total, Total.ToString("C"));
            output = output.Replace(ReceiptPieces.SubTotal, SubTotal.ToString("C"));
            output = output.Replace(ReceiptPieces.Tax, Taxes.ToString("C"));

            return(output);
        }
예제 #14
0
 private void DgvListado_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         DgvMostrarDetalle.DataSource = NIngreso.ListarDetalle(Convert.ToInt32(DgvListado.CurrentRow.Cells["ID"].Value));
         decimal Total, SubTotal;
         decimal Impuesto = Convert.ToDecimal(DgvListado.CurrentRow.Cells["Impuesto"].Value);
         Total                  = Convert.ToDecimal(DgvListado.CurrentRow.Cells["Total"].Value);
         SubTotal               = Total / (1 + Impuesto);
         txtSubTotalD.Text      = SubTotal.ToString("#0.00#");
         txtTotalImpuestoD.Text = (Total - SubTotal).ToString("#0.00#");
         txtTotalD.Text         = Total.ToString("#0.00#");
         PanelMostrar.Visible   = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #15
0
        public Boolean Guardar_Compra()
        {
            Boolean Guardado = false;
            String  Sentencia;

            DataManager.CLS.DBOperacion Operacion = new DataManager.CLS.DBOperacion();
            NumberFormatInfo            nfi       = new NumberFormatInfo();

            nfi.NumberDecimalSeparator = ".";
            try
            {
                Sentencia  = @"Insert into DetalleMovimiento(idMovimiento, idProducto, Fecha, Costo, 
                              CantidadEntrada, Gravado, MontoIVA, 
                              SubTotal) Values(";
                Sentencia += "'" + IDMovimiento + "',";
                Sentencia += "'" + IDProducto + "',";
                Sentencia += "'" + Fecha + "',";
                Sentencia += "'" + Costo.ToString(nfi) + "',";
                Sentencia += "'" + CEntrada.ToString(nfi) + "',";
                Sentencia += "'" + Gravado.ToString(nfi) + "',";
                Sentencia += "'" + IVA.ToString(nfi) + "',";
                Sentencia += "'" + SubTotal.ToString(nfi) + "');";
                if (Operacion.Insertar(Sentencia.ToString(nfi)) > 0)
                {
                    MessageBox.Show("Registro Insertado con Éxito", "Confirmacion", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Guardado = true;
                }
                else
                {
                    MessageBox.Show("No se pudo realizar el registro", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    Guardado = false;
                }
            }
            catch
            {
                MessageBox.Show("Error al insertar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Guardado = false;
            }
            return(Guardado);
        }
예제 #16
0
        private void CalcularTotales(double pTotal)
        {
            double Total = pTotal;
            double Igv;
            double SubTotal;

            if (Total > 700)
            {
                txtDetraccion.Text = (Total * 0.1).ToString();
            }
            else
            {
                txtDetraccion.Text = "0.00";
            }

            Igv      = (Total * 1.18) - Total;
            SubTotal = Total;

            txtTotalFacturar.Text = (Total + Igv).ToString();
            txtIgv.Text           = Igv.ToString();
            txtSubTotal.Text      = SubTotal.ToString();
            grdData.DataSource    = _ListaFacturacionDetalle;
        }
예제 #17
0
        public Boolean Actualizar_Compra()
        {
            Boolean Guardado = false;
            String  Sentencia;

            DataManager.CLS.DBOperacion Operacion = new DataManager.CLS.DBOperacion();
            NumberFormatInfo            nfi       = new NumberFormatInfo();

            nfi.NumberDecimalSeparator = ".";
            try
            {
                Sentencia  = @"update DetalleMovimiento set ";
                Sentencia += "idProducto='" + IDProducto + "',";
                Sentencia += "Costo='" + Costo.ToString(nfi) + "',";
                Sentencia += "CantidadEntrada='" + CEntrada.ToString(nfi) + "',";
                Sentencia += "Gravado='" + Gravado.ToString(nfi) + "',";
                Sentencia += "MontoIVA='" + IVA.ToString(nfi) + "',";
                Sentencia += "SubTotal='" + SubTotal.ToString(nfi) + "' where idmovimiento='" + IDMovimiento + "' and iddetalle='" + IDDetalle + "';";
                if (Operacion.Insertar(Sentencia.ToString(nfi)) > 0)
                {
                    MessageBox.Show("Registro Insertado con Éxito", "Confirmacion", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Guardado = true;
                }
                else
                {
                    MessageBox.Show("No se pudo realizar el registro", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    Guardado = false;
                }
            }
            catch
            {
                MessageBox.Show("Error al insertar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Guardado = false;
            }
            return(Guardado);
        }
예제 #18
0
        // To calaculate the whole amount
        private void claculateButton_Click(object sender, EventArgs e)
        {
            Double BasePrice = Convert.ToDouble(textBox1.Text);
            Double SubTotal, Total, Allownace, AmountDue;
            Double AdditionalOptions = 0;

            if (checkBox1.Checked == true)
            {
                AdditionalOptions = AdditionalOptions + 425.76;
            }
            if (checkBox2.Checked == true)
            {
                AdditionalOptions = AdditionalOptions + 987.41;
            }
            if (checkBox3.Checked == true)
            {
                AdditionalOptions = AdditionalOptions + 1741.23;
            }
            if (radioButton2.Checked == true)
            {
                AdditionalOptions = AdditionalOptions + 345.72;
            }
            if (radioButton3.Checked == true)
            {
                AdditionalOptions = AdditionalOptions + 599.99;
            }
            textBox2.Text = AdditionalOptions.ToString();
            SubTotal      = AdditionalOptions + BasePrice;
            textBox3.Text = SubTotal.ToString();
            textBox4.Text = CalTax(SubTotal).ToString();
            Total         = CalTax(SubTotal) + SubTotal;
            textBox5.Text = Total.ToString();
            Allownace     = Convert.ToDouble(textBox6.Text);
            AmountDue     = Total - Allownace;
            textBox7.Text = AmountDue.ToString();
        }
예제 #19
0
 /// <summary>
 /// Represents the object as a string
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return "Request: " + _requestdate.ToShortDateString() + "\nDelivery: " + _deliverydate.ToShortDateString() + "\nCustomer: " + _customer.FullName + "\nSub Total: " + SubTotal.ToString("C")+"\nSalesTax:"+SalesTax.ToString("C")+"\nTotal: "+Total.ToString("C");
 }
예제 #20
0
 public override string ToString()
 {
     return("\nPagamento Basico: " + SubTotal.ToString("F2", CultureInfo.InvariantCulture) +
            "\nImpostos:  " + Impostos.ToString("F2", CultureInfo.InvariantCulture) +
            "\nTotal Geral: " + Total.ToString("F2", CultureInfo.InvariantCulture));
 }
예제 #21
0
        public void Duracao(DateTime retirada, DateTime devolucao, double valorHora, double valorDia)
        {
            int dias    = 0;
            int horas   = 0;
            int minutos = 0;

            SubTotal = 0.0;
            TimeSpan tempo = devolucao.Subtract(retirada);

            Console.WriteLine("tempo total " + tempo);
            if (tempo.TotalHours > 12)
            {
                dias    += tempo.Days;
                horas   += tempo.Hours;
                minutos += tempo.Minutes;
                Console.WriteLine("Total em dia(s): " + dias);
                Console.WriteLine("Total em hora(s): " + horas);
                Console.WriteLine("Total em minuto(s): " + minutos);

                if (dias > 0 && horas > 0)
                {
                    dias++;
                    SubTotal += dias * valorDia;
                    Console.WriteLine("Basic payament " + dias + " Dias * " + valorDia.ToString("F2", CultureInfo.InvariantCulture) + " = " + SubTotal.ToString("F2", CultureInfo.InvariantCulture));
                }
                else if (dias > 0 && minutos > 0)
                {
                    dias++;
                    SubTotal += dias * valorDia;
                    Console.WriteLine("Basic payament " + dias + " Dias * " + valorDia.ToString("F2", CultureInfo.InvariantCulture) + " = " + SubTotal.ToString("F2", CultureInfo.InvariantCulture));
                }
                else
                {
                    SubTotal += dias * valorDia;
                    Console.WriteLine("Basic payament " + dias + " Dias * " + valorDia.ToString("F2", CultureInfo.InvariantCulture) + " = " + SubTotal.ToString("F2", CultureInfo.InvariantCulture));
                }
            }
            else if (tempo.TotalHours <= 12)
            {
                dias    += tempo.Days;
                minutos += tempo.Minutes;
                horas   += tempo.Hours;
                Console.WriteLine("Total em dia(s): " + dias);
                Console.WriteLine("Total em hora(s): " + horas);
                Console.WriteLine("Total em minuto(s): " + minutos);

                if (minutos > 0)
                {
                    horas++;
                    SubTotal += horas * PrecoHora;
                    Console.WriteLine("Basic payament " + horas + " Horas * " + valorHora.ToString("F2", CultureInfo.InvariantCulture) + " = " + SubTotal.ToString("F2", CultureInfo.InvariantCulture));
                }
                else
                {
                    SubTotal += horas * PrecoHora;
                    Console.WriteLine("Basic payament " + horas + " Horas * " + valorHora.ToString("F2", CultureInfo.InvariantCulture) + " = " + SubTotal.ToString("F2", CultureInfo.InvariantCulture));
                }
            }
            else
            {
                throw new Exception("Erro na data informada");
            }
        }
예제 #22
0
        private void btnConfirmar_Click(object sender, EventArgs e)
        {
            if (!Comprobar())
            {
                return;
            }
            //DialogResult resultado = MessageBox.Show(this, "Estás seguro?", "Aviso", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            //DialogResult resultado=frmCambio

            //if (resultado == DialogResult.Yes)
            //{

            #region Crear Encabezado de factura
            Factura factura = new Factura();
            factura.IdCliente = txtID.Text;
            factura.Fecha     = DateTime.Now.Date;
            factura.Direccion = txtDireccionFacturacion.Text;

            factura.UserName = (Sesion.UsuarioActual != null ? Sesion.UsuarioActual.UserName : "******");

            foreach (DataGridViewRow fila in dgvLineaCompra.Rows)
            {
                DetalleFactura detalleFactura = new DetalleFactura();
                detalleFactura.IdProducto = Convert.ToString(fila.Cells["Id"].Value);

                detalleFactura.PrecioUnidad = Convert.ToDecimal(fila.Cells["PrecioUnidad"].Value);

                if (modoMayoreo)
                {
                    detalleFactura.PrecioUnidad -= (detalleFactura.PrecioUnidad * 0.10M);
                }

                detalleFactura.Cantidad = Convert.ToInt32(fila.Cells["Cantidad"].Value);

                factura.Detalles.Add(detalleFactura);
            }
            factura.ImpuestosAcumulados = ItbisAcumulados;

            frmCambio fcamb = new frmCambio();

            fcamb.Total = factura.Total;

            DialogResult result = fcamb.ShowDialog();

            List <ReportParameter> listaParametros = new List <ReportParameter>();

            if (result == DialogResult.OK)
            {
                int folio = FacturaBO.RegistrarFacturacion(factura);

                frmMostrarFactura fmost = new frmMostrarFactura(folio);

                ReportParameter prmEmpresa = new ReportParameter
                                             (
                    "Empresa", ConfigurationManager.AppSettings["Empresa"].ToString()
                                             );
                listaParametros.Add(prmEmpresa);

                ReportParameter prmDireccionEmpresa = new ReportParameter
                                                      (
                    "DireccionEmpresa", ConfigurationManager.AppSettings["Direccion"].ToString()
                                                      );
                listaParametros.Add(prmDireccionEmpresa);

                ReportParameter prmTelefonoEmpresa = new ReportParameter
                                                     (
                    "TelefonoEmpresa",
                    ConfigurationManager.AppSettings["Telefono"].ToString()
                                                     );
                listaParametros.Add(prmTelefonoEmpresa);

                ReportParameter prmRNC = new ReportParameter
                                         (
                    "RNC",
                    ConfigurationManager.AppSettings["RNC"].ToString()
                                         );
                listaParametros.Add(prmRNC);

                ReportParameter prmFecha = new ReportParameter
                                           (
                    "Fecha",
                    DateTime.Today.ToString()
                                           );
                listaParametros.Add(prmFecha);

                ReportParameter prmCliente = new ReportParameter
                                             (
                    "Cliente",
                    txtNombre.Text
                                             );
                listaParametros.Add(prmCliente);

                ReportParameter prmDireccionCliente = new ReportParameter
                                                      (
                    "DireccionCliente",
                    txtDireccion.Text
                                                      );
                listaParametros.Add(prmDireccionCliente);

                ReportParameter prmNumeroFactura = new ReportParameter
                                                   (
                    "NumeroFactura",
                    folio.ToString()
                                                   );
                listaParametros.Add(prmNumeroFactura);

                ReportParameter prmTotalFactura = new ReportParameter
                                                  (
                    "TotalFactura",
                    factura.Total.ToString()
                                                  );
                listaParametros.Add(prmTotalFactura);

                ReportParameter prmImpuestos = new ReportParameter
                                               (
                    "Impuestos",
                    factura.ImpuestosAcumulados.ToString()
                                               );
                listaParametros.Add(prmImpuestos);

                ReportParameter prmSubTotal = new ReportParameter
                                              (
                    "SubTotal",
                    SubTotal.ToString()
                                              );
                listaParametros.Add(prmSubTotal);

                fmost.reportViewer1.LocalReport.SetParameters(listaParametros);
                fmost.reportViewer1.RefreshReport();
                fmost.ShowDialog();

                MessageBox.Show("Hecho");


                this.Dispose();
            }


            #endregion

            //}
        }