Beispiel #1
0
        private void button10_Click(object sender, RoutedEventArgs e)
        {
            DatosCehavi datos1 = new DatosCehavi();

            datos1.Connect();

            if (this.curPaciente == 0)
            {
                MessageBox.Show("Por favor primero, guarde el paciente y luego proceda a dar de alta las terapias", "Advertencia");
                return;
            }

            Terapia dlg1 = new Terapia();

            dlg1.SetCurPaciente(this.curPaciente);
            //dlg1.NombrePaciente = this.NombrePaciente.Text;
            dlg1.ShowDialog();

            MessageBox.Show("Operación realizada", "Información");
            CargaTerapias();
        }
Beispiel #2
0
        private void button11_Click(object sender, RoutedEventArgs e)
        {
            DataGridCellInfo curcell = dataGrid.CurrentCell;

            object item = dataGrid.SelectedItem;

            if (item == null)
            {
                return;
            }

            object curType = ((DataRowView)dataGrid.SelectedItem).Row[0];
            // string curObject = curType.GetType().ToString();

            Int32   curId = (Int32)((DataRowView)dataGrid.SelectedItem).Row["IdTerapia"];
            Terapia dlg1  = new Terapia();

            dlg1.SetCurPaciente(this.curPaciente);
            dlg1.SetCurTerapia(curId);
            dlg1.ShowDialog();

            MessageBox.Show("Operación realizada", "Información");
            CargaTerapias();
        }