示例#1
0
        private void BtnRegistrar_Click(object sender, EventArgs e)
        {
            Factory data = new Factory();

            if (data.RegistrarOperacion(Convert.ToInt32(TxtEmpleadoId.Text), DateTime.Now))
            {
                msg = new FrmMensaje("Operación registrada.");
                TimerMsg.Interval = 2000;
                TimerMsg.Start();
                msg.StartPosition = FormStartPosition.CenterParent;
                msg.ShowDialog(this);
            }
        }
示例#2
0
 private void TimerMsg_Tick(object sender, EventArgs e)
 {
     if (msg != null)
     {
         TimerButton.Stop();
         msg.Close();
         msg = null;
         PanelEmpleado.Visible     = false;
         TxtCodigoEmpleado.Enabled = true;
         TxtCodigoEmpleado.Text    = "";
         TxtCodigoEmpleado.Focus();
         TimerMsg.Interval = 500;
     }
     else
     {
         TxtCodigoEmpleado.Focus();
         TimerMsg.Stop();
     }
 }