Exemplo n.º 1
0
 private void DoctorLE_EditValueChanged(object sender, EventArgs e)
 {
     if (DoctorLE.EditValue != null)
     {
         foreach (Doctor dr in _doctor)
         {
             if (dr.ID == int.Parse(DoctorLE.EditValue.ToString()))
             {
                 doctor       = dr;
                 _workingTime = _DB.GetWorkingTime();
                 foreach (Working_time wt in _workingTime)
                 {
                     if (wt.ID == dr.Working_time)
                     {
                         workingTime = wt;
                         WortTimeAM_PM();
                     }
                 }
             }
         }
         HideShowElement(true);
     }
     else
     {
         HideShowElement(false);
     }
 }
Exemplo n.º 2
0
 public WorkingDaysForm(DBCommunication.DBCommunicationAdmin _db)
 {
     InitializeComponent();
     _DB           = _db;
     _working_time = _DB.GetWorkingTime();
     WorkingTimeGridControl.DataSource = _working_time;
 }
Exemplo n.º 3
0
 public DoctorForm(DBCommunication.DBCommunicationAdmin _db)
 {
     InitializeComponent();
     _DB     = _db;
     _doctor = _DB.GetDoctor();
     DoctorGridControl.DataSource = _doctor;
     _working_time = _DB.GetWorkingTime();
     WorkingTimeLE.Properties.DataSource    = _working_time;
     WorkingTimeLE.Properties.DisplayMember = "Odd_Even";
     WorkingTimeLE.Properties.ValueMember   = "ID";
 }
Exemplo n.º 4
0
 private void NewBarItem_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (Odd_EvenCB.SelectedIndex > 0 && Morning_AfternoonCB.SelectedIndex > 0)
     {
         string oddeven          = (Odd_EvenCB.SelectedIndex == 1) ? "Neparni" : "Parni";
         string morningafternoon = (Morning_AfternoonCB.SelectedIndex == 1) ? "Jutro" : "Posljepodne";
         working_time                   = new Working_time();
         working_time.Odd_Even          = oddeven;
         working_time.Morning_Afternoon = morningafternoon;
         if (!_DB.InsertWorkingDay(working_time))
         {
             XtraMessageBox.Show("Element is not added!");
         }
         _working_time = _DB.GetWorkingTime();
         WorkingTimeGridControl.DataSource = _working_time;
         Odd_EvenCB.SelectedIndex          = 0;
         Morning_AfternoonCB.SelectedIndex = 0;
     }
     else
     {
         XtraMessageBox.Show("All fields should be filled!");
     }
 }