Пример #1
0
        public DoctorEntryForm(string mode,int doctorId)
        {
            InitializeComponent();
            if (mode == "Update")
            {
                //MessageBox.Show(doctorId.ToString());
                Doctor aDoctor=new Doctor();
                BLL.DoctorManager manager=new DoctorManager();
                aDoctor = manager.GetDoctorById(doctorId);

                idforSearch = aDoctor.Id;

                nameTextBox.Text = aDoctor.Name;
                GetDepartmentsInComboBox();
                departmentComboBox.SelectedValue=aDoctor.DepartmentId;
                saveButton.Text = "Update";

            }
            else
            {
                GetDepartmentsInComboBox();
            }
        }