예제 #1
0
 private void FormProduction_Load(object sender, System.EventArgs e)
 {
     checkAllProv.Checked = false;
     _listProviders       = Providers.GetListReports();
     textToday.Text       = DateTime.Today.ToShortDateString();
     for (int i = 0; i < _listProviders.Count; i++)
     {
         listProv.Items.Add(_listProviders[i].GetLongDesc());
     }
     if (PrefC.HasClinicsEnabled)
     {
         _listClinics = Clinics.GetForUserod(Security.CurUser);
         if (!Security.CurUser.ClinicIsRestricted)
         {
             listClin.Items.Add(Lan.g(this, "Unassigned"));
             listClin.SetSelected(0, true);
         }
         for (int i = 0; i < _listClinics.Count; i++)
         {
             int curIndex = listClin.Items.Add(_listClinics[i].Abbr);
             if (Clinics.ClinicNum == 0)
             {
                 listClin.SetSelected(curIndex, true);
                 checkAllClin.Checked = true;
             }
             if (_listClinics[i].ClinicNum == Clinics.ClinicNum)
             {
                 listClin.SelectedIndices.Clear();
                 listClin.SetSelected(curIndex, true);
             }
         }
     }
     else
     {
         listClin.Visible     = false;
         labelClin.Visible    = false;
         checkAllClin.Visible = false;
     }
     _listPayPeriods       = PayPeriods.GetDeepCopy();
     _selectedPayPeriodIdx = PayPeriods.GetForDate(DateTime.Today);
     if (_selectedPayPeriodIdx < 0)
     {
         dtPickerFrom.Value = DateTime.Today.AddDays(-7);
         dtPickerTo.Value   = DateTime.Today;
     }
     else
     {
         dtPickerFrom.Value = _listPayPeriods[_selectedPayPeriodIdx].DateStart;
         dtPickerTo.Value   = _listPayPeriods[_selectedPayPeriodIdx].DateStop;
     }
     butThis.Text = Lan.g(this, "This Period");
     SetDates();
 }
예제 #2
0
 private void FormTimeCard_Load(object sender, System.EventArgs e)
 {
     Text              = Lan.g(this, "TimeCard for") + " " + EmployeeCur.FName + " " + EmployeeCur.LName;
     TimeDelta         = ClockEvents.GetServerTime() - DateTime.Now;
     SelectedPayPeriod = PayPeriods.GetForDate(DateTime.Today);
     if (IsBreaks)
     {
         textOvertime.Visible  = false;
         labelOvertime.Visible = false;
         butCompute.Visible    = false;
         butAdj.Visible        = false;
     }
     FillPayPeriod();
     FillMain(true);
 }