Example #1
0
 private void BB_Gravar_Click(object sender, EventArgs e)
 {
     if (panelDados1.validarCampoObrigatorio())
     {
         if (RB_Pagar.Checked && (VL_Pagar.Value == 0))
         {
             MessageBox.Show("Campo Obrigatório.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information);
             VL_Pagar.Focus();
             return;
         }
         if (RB_Receber.Checked && (VL_Receber.Value == 0))
         {
             MessageBox.Show("Campo Obrigatório.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information);
             VL_Receber.Focus();
             return;
         }
         if (VL_Pagar.Focused)
         {
             (dsLanCaixa.Current as TRegistro_LanCaixa).Vl_PAGAR = VL_Pagar.Value;
         }
         if (VL_Receber.Focused)
         {
             (dsLanCaixa.Current as TRegistro_LanCaixa).Vl_RECEBER = VL_Receber.Value;
         }
         this.DialogResult = DialogResult.OK;
     }
 }
Example #2
0
 private void VL_Pagar_Enter(object sender, EventArgs e)
 {
     VL_Pagar.Select(0, VL_Pagar.Value.ToString().Length);
 }