public EmployeeP(View.EmployeeV employeeWindow, decimal id) { EmployeeViewObj = employeeWindow; EmployeeModelObj = new Model.EmployeeM(this, id); foreach (Control control in EmployeeViewObj.Controls) { if (control is TextBox) { ((TextBox)control).ReadOnly = true; } else if (control is DateTimePicker) { ((DateTimePicker)control).Enabled = false; } else if (control is ComboBox) { ((ComboBox)control).Enabled = false; } } }
public EmployeeP(View.EmployeeV employeeWindow) { EmployeeViewObj = employeeWindow; EmployeeModelObj = new Model.EmployeeM(this); }