private void btnFacturar_Click(object sender, EventArgs e) { try { double totalLocal = _ls.ObtenerTotalLocal(Convert.ToInt32(txtHoraPico.Text), Convert.ToInt32(txtHoraNoPico.Text), Convert.ToInt32(txtFinde.Text)); double totalNacional = _ls.ObtenerTotalNacional(Convert.ToInt32(txtCentro.Text), Convert.ToInt32(txtLitoral.Text), Convert.ToInt32(txtNOA.Text), Convert.ToInt32(txtCuyo.Text), Convert.ToInt32(txtPatagonia.Text)); double totalInternacional = _ls.ObtenerTotalInternacional(Convert.ToInt32(txtLATAM.Text), Convert.ToInt32(txtNorteamerica.Text), Convert.ToInt32(txtEuropa.Text), Convert.ToInt32(txtAfrica.Text), Convert.ToInt32(txtAsia.Text), Convert.ToInt32(txtOceania.Text)); Factura f = new Factura(totalLocal, totalNacional, totalInternacional); double total = _fs.TotalFactura(f); txtFactura.Text = "Abono fijo mensual: " + f.Abono + "\n\nLlamadas locales:\n\tEn hora pico ($0,20 x min): " + txtHoraPico.Text + " min" + "\n\tEn hora no pico ($0,10 x min): " + txtHoraNoPico.Text + " min" + "\n\tFines de semana ($0'10 x min): " + txtFinde.Text + " min" + "\nSubtotal: $" + totalLocal + "\n\nLlamadas nacionales:\n\tAl Centro ($0,25 x min): " + txtCentro.Text + " min" + "\n\tAl Litoral ($0,30 x min): " + txtLitoral.Text + " min" + "\n\tAl Noroeste ($0,35 x min): " + txtNOA.Text + " min" + "\n\tA Cuyo ($0,40 x min): " + txtCuyo.Text + " min" + "\n\tA la Patagonia ($0,45 x min): " + txtPatagonia.Text + " min" + "\nSubtotal: $" + totalNacional + "\n\nLlamadas internacionales:\n\tA Latinoamérica ($0,50 x min): " + txtLATAM.Text + " min" + "\n\tA Norteamérica ($0,55 x min): " + txtNorteamerica.Text + " min" + "\n\tA Europa ($0,60 x min): " + txtEuropa.Text + " min" + "\n\tA África ($0,65 x min): " + txtAfrica.Text + " min" + "\n\tA Asia ($0,70 x min): " + txtAsia.Text + " min" + "\n\tA Oceanía ($0,75 x min): " + txtOceania.Text + " min" + "\nSubtotal: $" + totalInternacional + "\n\nTotal facturado: $" + total; gbFactura.Visible = true; } catch (Exception ex) { MessageBox.Show("Error:\n" + ex.Message); } }