Ejemplo n.º 1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            int?id = GetId();

            //MessageBox.Show(id.ToString());
            if (id != null)
            {
                DataSet1TableAdapters.PatientTableAdapter ta = new DataSet1TableAdapters.PatientTableAdapter();
                DataSet1.PatientDataTable pt = ta.GetDataByIdPatient((int)id);

                DataSet1.PatientRow row = (DataSet1.PatientRow)pt.Rows[0];
                txtNombre.Text   = row.patientName;
                txtApellido.Text = row.patientLastName;
                txtEmail.Text    = row.patientEmail;
            }
            else
            {
                MessageBox.Show("No hay registros");
            }
        }
Ejemplo n.º 2
0
 //编辑时候调用,所以要传一个病人信息进来
 public frmPatientEditor(DataSet1.PatientRow pRow) : this()
 {
     this.pRow     = pRow;
     this.isAdding = false;
     this.ShowPatientInfo();
 }
Ejemplo n.º 3
0
 private string name;             //病人姓名
 public frmPatientEditor()        //增加时候调用
 {
     InitializeComponent();
     this.pRow     = Form1.staticPTable.NewPatientRow();
     this.isAdding = true;
 }