コード例 #1
0
 private void btn_Modify_Click(object sender, EventArgs e)
 {
     //-------------------------------------------------------------------------------------------
     try
     {
         frm.txtgenderHide.Text = this.grid_All_Patient.CurrentRow.Cells[2].Value.ToString();
         frm.txt_status.Text    = this.grid_All_Patient.CurrentRow.Cells[5].Value.ToString();
         //-------------------------------------------------------------------------------------------
         Refresh_Rdbgender();
         Refresh_Rdbstatus();
         frm.txt_Patient_Id.Text   = this.grid_All_Patient.CurrentRow.Cells[0].Value.ToString();
         frm.txt_Patient_Name.Text = this.grid_All_Patient.CurrentRow.Cells[1].Value.ToString();
         gender = this.grid_All_Patient.CurrentRow.Cells[2].Value.ToString();
         frm.dtp_Patient_birthday.Value  = Convert.ToDateTime(this.grid_All_Patient.CurrentRow.Cells[3].Value.ToString());
         frm.dtp_Registration_Date.Value = Convert.ToDateTime(this.grid_All_Patient.CurrentRow.Cells[4].Value.ToString());
         status = this.grid_All_Patient.CurrentRow.Cells[5].Value.ToString();
         frm.rtxt_Adresse.Text     = this.grid_All_Patient.CurrentRow.Cells[6].Value.ToString();
         frm.txt_email.Text        = this.grid_All_Patient.CurrentRow.Cells[7].Value.ToString();
         frm.mTxt_contact_no.Text  = this.grid_All_Patient.CurrentRow.Cells[8].Value.ToString();
         frm.mTxt_contact_no2.Text = this.grid_All_Patient.CurrentRow.Cells[9].Value.ToString();
         frm.Text  = "تحديث المريض : " + this.grid_All_Patient.CurrentRow.Cells[1].Value.ToString();
         frm.state = "update";
         frm.txt_Patient_Id.ReadOnly = true;
         frm.btnAdd.Text             = "تحديث";
         frm.ShowDialog();
         grid_All_Patient.DataSource = ptn.GET_ALL_PATIENT("");
     }
     catch (Exception ex)
     {
         ex.ToString();
     }
 }
コード例 #2
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            frm_Add_Patient new_ptn = new frm_Add_Patient();

            new_ptn.ShowDialog();
        }
コード例 #3
0
 private void btn_Add_Click(object sender, EventArgs e)
 {
     frm.ShowDialog();
 }