예제 #1
0
 private void BtnConfirmar_Click(object sender, EventArgs e)
 {
     if (TxtJustificativa.Text.Length < 10)
     {
         MessageBox.Show("Preencha a justificativa com no mínimo dez (10) caracteres.");
         TxtJustificativa.Focus();
     }
     else
     {
         CPonto.ACESSOPONTOCONTROLE oAcesso = new CPonto.ACESSOPONTOCONTROLE();
         oAcesso.APAcessoForcado              = true;
         oAcesso.APCodigoPontoControle        = PontoControle;
         oAcesso.APCodigoUsuarioLiberaForcado = CodigoUsuario;
         oAcesso.APDataAcesso          = DateTime.Now;
         oAcesso.APMotivoAcessoForcado = TxtJustificativa.Text;
         oAcesso.APTipoPontoControle   = TipoPontoControle;
         CPonto.CPontoClient oProxy = new CPonto.CPontoClient();
         oProxy.IncluirAcesso(oAcesso);
         oProxy.Close();
         bolLibera = true;
         this.Close();
     }
 }
예제 #2
0
 private void KeyBoard_UserKeyPressed(object sender, KeyboardClassLibrary.KeyboardEventArgs e)
 {
     TxtJustificativa.Focus();
     SendKeys.Send(e.KeyboardKeyPressed);
 }