예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                m.ID_Personal = Convert.ToInt32(txtidpersonal.Text.Trim());
                m.Tipo        = p.ID_Tipo;
                txthora.Text  = DateTime.Now.ToString("hh:mm:ss");
                txtfecha.Text = DateTime.Now.ToShortDateString();
                m.Hora        = TimeSpan.Parse(txthora.Text.Trim());
                m.Fecha       = Convert.ToDateTime(txtfecha.Text.Trim());


                R_Humanos.AgregarMarcaTodos(m);
                MessageBox.Show("Marca agregada correctamente");
                txtidpersonal.Text = "";
                cboturno.Text      = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }