Esempio n. 1
0
 private void btnguardar_Click(object sender, EventArgs e)
 {
     try
     {
         selectplan();
         if (txtnombre.Text != "" && txtApellido.Text != "" && txtDireccion.Text != "" && txttelefono.Text != "" && txtnombreconta.Text != "" && txtelefonconta.Text != "")
         {
             frmpago.txttotal.Text = lblcosto.Text;
             if (frmpago.ShowDialog() == DialogResult.OK)
             {
                 lblpago.Text  = frmpago.MyPago;
                 lblsobro.Text = frmpago.mySobra;
                 guardardatos();
             }
         }
         else
         {
             MessageBox.Show("Complete los campos faltantes", "Aviso Importante", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Campos Faltantes", "Rellene los campos", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
     }
 }
Esempio n. 2
0
        private void btnpagar_Click(object sender, EventArgs e)
        {
            FrmPago f = new FrmPago();

            f.txttotal.Text = txttotal.Text;
            if (f.ShowDialog() == DialogResult.OK)
            {
                lblpago.Text  = f.MyPago;
                lblsobro.Text = f.mySobra;
                pagar();
            }
        }