private void Btn_Reset_Click(object sender, EventArgs e) { Com_Paient.DropDownStyle = ComboBoxStyle.DropDown; Btn_AddVisits.Enabled = true; Btn_Update.Enabled = false; CheckofOldvisit = 0; Btn_Symptoms.Enabled = false; Enable_Btn_Add_Chronic = true; Com_Paient.ForeColor = Color.Gray; Com_Doctors.ForeColor = Color.Gray; Com_Paient.Text = "اختيار"; Com_Paient.Focus(); Com_Doctors.Text = "اختيار"; LabCount.Text = "0"; RText_Treatment.ResetText(); RText_Implement.ResetText(); RText_TotalPaid.ResetText(); RText_Symptoms.ResetText(); RText_Approximate.ResetText(); RText_Balance.ResetText(); DGV_Visits.ClearSelection(); }
private void DGV_Visits_DoubleClick(object sender, EventArgs e) { try { if (DGV_Visits.SelectedRows.Count == 0) { return; } Btn_Symptoms.Enabled = false; Enable_Btn_Add_Chronic = false; CheckofOldvisit = 0; Com_Paient.Text = this.DGV_Visits.CurrentRow.Cells[2].Value.ToString(); Com_Doctors.Text = this.DGV_Visits.CurrentRow.Cells[3].Value.ToString(); RText_Treatment.Text = this.DGV_Visits.CurrentRow.Cells[6].Value.ToString(); RText_Implement.Text = this.DGV_Visits.CurrentRow.Cells[7].Value.ToString(); RText_Approximate.Text = this.DGV_Visits.CurrentRow.Cells[8].Value.ToString(); RText_TotalPaid.Text = this.DGV_Visits.CurrentRow.Cells[9].Value.ToString(); RText_Balance.Text = this.DGV_Visits.CurrentRow.Cells[10].Value.ToString(); Btn_Update.Enabled = true; Enable_BtnAdd = false; Btn_AddVisits.Enabled = false; DGV_Visits.ClearSelection(); Com_Doctors.ForeColor = Color.Black; Com_Paient.ForeColor = Color.Black; } catch (Exception ex) { } }
private void VisitsForm_Load(object sender, EventArgs e) { Com_Paient.ResetText(); Com_Paient.ForeColor = Color.Gray; Com_Paient.Text = "اختيار"; Com_Doctors.ResetText(); Com_Doctors.ForeColor = Color.Gray; Com_Doctors.Text = "اختيار"; DGV_Visits.ClearSelection(); }