Пример #1
0
 /// <summary>
 /// EventHandler del boton DB
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnBaseDeDatos_Click(object sender, EventArgs e)
 {
     try {
         this.salita   = this.dao.ReadData("Pacientes", this.salita);
         this.llamador = new FrmLlamador(this.salita.Pacientes);
         this.llamador.ShowDialog();
         this.txt.Guardar(filePath, this.salita.Pacientes);
     } catch (Exception exe) {
         MessageBox.Show(exe.Message);
     }
 }
Пример #2
0
        /// <summary>
        /// EventHandler del boton XML
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnXml_Click(object sender, EventArgs e)
        {
            string         file;
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.InitialDirectory = filePath;
            openFile.Filter           = XMLFILTER;
            try {
                if (openFile.ShowDialog() == DialogResult.OK)
                {
                    file          = openFile.FileName;
                    this.salita   = this.xml.ReadData(file, this.salita);
                    this.llamador = new FrmLlamador(this.salita.Pacientes);
                    this.llamador.ShowDialog();
                    this.txt.Guardar(filePath, this.salita.Pacientes);
                }
            } catch (Exception exe) {
                MessageBox.Show(exe.Message);
            }
        }