示例#1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (ValidarRegistro())
            {
                try
                {
                    HistoriaCab               = new clsHistoria();
                    HistoriaCab.Numero        = txtNumero.Text;
                    HistoriaCab.PacienteID    = Paciente.ID;
                    HistoriaCab.UsuarioID     = frmLogin.iCodUser;
                    HistoriaCab.FechaRegistro = DateTime.Now;

                    if (AdmClin.InsertHistoriaCabecera(HistoriaCab))
                    {
                        MessageBox.Show("HISTORIA CLINICA REGISTRADA CORRECTAMENTE", "SGE SYSTEM'S", MessageBoxButtons.OK, MessageBoxIcon.Information);

                        PostConstructor();
                    }
                    else
                    {
                        MessageBox.Show("ERROR AL REGISTRAR LA HISTORIA CLINICA", "SGE SYSTEM'S", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("ERROR: " + ex.Message, "SGE SYSTEM'S", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }