private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtDias.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar los Dias Trabajados");
                TxtDias.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar los Dias Trabajados");
                TxtPrecio.Focus();
                return;
            }

            double d, p, tot;

            d = Convert.ToDouble(TxtDias.Text);

            p = Convert.ToDouble(TxtPrecio.Text);

            tot = d * p;

            TxtSalario.Text = tot.ToString();
        }
示例#2
0
 private void BtnLimpiar_Click(object sender, EventArgs e)
 {
     TxtDias.Clear();
     TxtSal.Clear();
     TxtValor.Clear();
     TxtDias.Focus();
 }
示例#3
0
        private void BtnConvertir_Click(object sender, EventArgs e)
        {
            double dias;

            dias = Convert.ToDouble(TxtDias.Text.Trim());

            dia.dias(dias);

            TxtDias.Clear();
            TxtDias.Focus();
        }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            double dias, predia;

            dias   = Convert.ToDouble(TxtDias.Text.Trim());
            predia = Convert.ToDouble(TxtPrecioD.Text.Trim());

            sald.SalDia(dias, predia);

            foreach (TextBox txt in this.Controls.OfType <TextBox>())
            {
                txt.Clear();

                TxtDias.Focus();
            }
        }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            double dia, pred, hre, prehe;

            dia   = Convert.ToDouble(TxtDias.Text.Trim());
            pred  = Convert.ToDouble(TxtPrecioD.Text.Trim());
            hre   = Convert.ToDouble(TxtHorasE.Text.Trim());
            prehe = Convert.ToDouble(TxtPrecioH.Text.Trim());

            salhe.SalaHrE(dia, pred, hre, prehe);

            foreach (TextBox txt in this.Controls.OfType <TextBox>())
            {
                txt.Clear();
                TxtDias.Focus();
            }
        }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtDias.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar los Dias Trabajados");
                TxtDias.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar Precio por Dia Trabajado");
                TxtPrecio.Focus();
                return;
            }
            if (TxtHe.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar la Cantidad de Horas Extras");
                TxtHe.Focus();
                return;
            }
            if (TxtPhe.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar la Precio por Hora Extra");
                TxtPhe.Focus();
                return;
            }
            double d, p, t, he, ph, the, sn;

            d   = Convert.ToDouble(TxtDias.Text);
            p   = Convert.ToDouble(TxtPrecio.Text);
            he  = Convert.ToDouble(TxtHe.Text);
            ph  = Convert.ToDouble(TxtPhe.Text);
            t   = d * p;
            the = he * ph;
            sn  = t + the;

            TxtSalarioBase.Text  = t.ToString();
            TxtSalarioExtra.Text = the.ToString();
            TxtSalarioNeto.Text  = sn.ToString();
        }
示例#7
0
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtDias.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese un dato");
                TxtDias.Focus();
                return;
            }

            if (TxtValor.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese un dato");
                TxtValor.Focus();
                return;
            }
            double dias, valor, salario;

            dias  = Convert.ToDouble(TxtDias.Text);
            valor = Convert.ToDouble(TxtValor.Text);

            salario = dias * valor;

            TxtSal.Text = salario.ToString();
        }