Esempio n. 1
0
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (Search())
     {
         Fill(MedicinasBLL.Buscar(Utilidades.StringToInt(medicinaIdTextBox.Text)));
     }
 }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            vent.Medicina.Add(MedicinasBLL.Buscar((int)MedicinascomboBox.SelectedValue));
            MedicinasdataGridView.DataSource = null;
            MedicinasdataGridView.DataSource = vent.Medicina;

            subTotalTextBox.Text = (from DataGridViewRow row in MedicinasdataGridView.Rows
                                    where row.Cells[3].FormattedValue.ToString() != string.Empty
                                    select Convert.ToDouble(row.Cells[3].FormattedValue)).Sum().ToString();
            if (ItbisradioButton.Checked == true && DescuentoradioButton.Checked == false)
            {
                totalTextBox.Text = (double.Parse(subTotalTextBox.Text) * 1.18).ToString();
            }

            if (ItbisradioButton.Checked == true && DescuentoradioButton.Checked == true)
            {
                totalTextBox.Text = (double.Parse(subTotalTextBox.Text) * (double.Parse(DescuentotextBox.Text) + 1) * (1.18)).ToString();
            }

            if (DescuentoradioButton.Checked == true && ItbisradioButton.Checked == false)
            {
                totalTextBox.Text = (double.Parse(subTotalTextBox.Text) * (double.Parse(DescuentotextBox.Text) + 1)).ToString();
            }

            if (ItbisradioButton.Checked == false && DescuentoradioButton.Checked == false)
            {
                totalTextBox.Text = subTotalTextBox.Text;
            }
        }
Esempio n. 3
0
        private bool Search()
        {
            if (MedicinasBLL.Buscar(Utilidades.StringToInt(medicinaIdTextBox.Text)) == null)
            {
                MessageBox.Show("El id no existe");
                return(false);
            }

            return(true);
        }