public FrmSettings()
 {
     InitializeComponent();
     _titleRepo    = new TitleRepo();
     _levelRepo    = new LevelRepo();
     _settingsRepo = new SettingsRepo();
 }
        public static void LoadTitles(ref ComboBox dropDown, bool includeAll = false)
        {
            var repo     = new TitleRepo();
            var allItems = repo.GetAllTitles();

            if (includeAll)
            {
                allItems.Insert(0, new PersonTitle
                {
                    Title = "All Titles",
                    Id    = Base.IdForSelectAll
                });
            }
            else
            {
                allItems.Insert(0, new PersonTitle()
                {
                    Title = "Select Title",
                    Id    = Base.IdForSelect
                });
            }

            dropDown.DataSource    = allItems;
            dropDown.DisplayMember = "Title";
            dropDown.ValueMember   = "Id";
            dropDown.SelectedIndex = 0;
        }
Beispiel #3
0
 public EntityService()
 {
     _appointmentService = new AppointmentRepo();
     _cityService        = new CityRepo();
     _hospitalService    = new HospitalRepo();
     _patientRepo        = new PatientRepo();
     _policlinicService  = new PoliclinicRepo();
     _staffRepo          = new StaffRepo();
     _titleService       = new TitleRepo();
     _townService        = new TownRepo();
     _userService        = new UserRepo();
 }
        public FrmTitle(string titleId = "")
        {
            InitializeComponent();
            _repo = new TitleRepo();
            _id   = titleId;

            if (titleId != "")
            {
                lblTitle.Text = "Update Title";
                GetItem(titleId);
            }
        }
Beispiel #5
0
 public TitleServImpl()
 {
     titleRepo = Factory.getInstance().getTitleRepo();
 }