internal void Clear() { if (WaitingList != null) { _waitingList.UpdatePatientStatus(WaitingList.Id, null); } WaitingList = null; Patient = null; lblPName.Text = ""; lblPGender.Text = ""; lblPAddress.Text = ""; lblPPhone.Text = ""; if (btnPatient.Name == "btnInfoPatient") { btnPatient.Name = "btnPatient"; btnPatient.Text = @"ជ្រើស អ្នកជម្ងឺថ្មី"; btnPatient.Click -= btnInfoPatient_Click; btnPatient.Click += btnPatient_Click; } chkBoxNurse.Checked = false; chkBoxReferrer.Checked = false; txtDescription.Text = ""; btnCreateNew.Enabled = true; btnWaitingList.Enabled = true; btnPatient.Enabled = true; cboService.Enabled = true; cboCategory.Enabled = true; }
internal void ClearControl() { txtName.Text = ""; txtGender.Text = ""; pnlSelection.Controls.Clear(); pnlShowService.Controls.Clear(); pnlSelection.Enabled = false; pnlShowService.Enabled = false; Patient = null; }
//C:\Users\Health\Desktop\Debug private void MedicalsForm_Shown(object sender, EventArgs e) { if (Patient != null) { lblPName.Text = Patient.FirstName + @" " + Patient.LastName; lblPGender.Text = Patient.Gender; lblPAddress.Text = Patient.Address; lblPPhone.Text = Patient.Phone1; } if (WaitingList != null) { lblPName.Text = WaitingList.Patient.FirstName + @" " + WaitingList.Patient.LastName; lblPGender.Text = WaitingList.Patient.Gender; lblPAddress.Text = WaitingList.Patient.Address; lblPPhone.Text = WaitingList.Patient.Phone1; btnPatient.Enabled = false; btnWaitingList.Enabled = false; btnCreateNew.Enabled = false; cboService.Enabled = false; cboCategory.Enabled = false; _waitingList.UpdatePatientStatus(WaitingList.Id, false); Patient = WaitingList.Patient; } if (KeyService != null) { if (KeyCategory != 0) { _keyCategory = KeyCategory; cboService.SelectedItem = KeyService; } else { } } var path = AppDomain.CurrentDomain.BaseDirectory; _path = path.Remove(path.Length - 46); //_path = path; //_path = @"S:\"; picHideRight.Image = Properties.Resources.Hide_right_icon; //picHideRight.ImageLocation = _path + @"Hide-right-icon.png"; picHideTop.Image = Properties.Resources.Hide_Up_icon; //picHideTop.ImageLocation = _path + @"Hide-Up-icon.png"; txtDescription.ForeColor = Color.Black; btnSample.Text = @"Save as" + Environment.NewLine + @"Sample"; txtNameDoctor.Text = Account.Worker.FirstName + @" " + Account.Worker.LastName; cboReferrer.Enabled = false; cboNurse.Enabled = false; }