Ejemplo n.º 1
0
        private LogForm(ActivitiesEvidence WebService, Settings AppSettings)
            : this()
        {
            _service = WebService;
            _settings = AppSettings;
            ComboBox customerColumnTemplate = logGlacialList.Columns["customerColumn"].ActivatedEmbeddedControlTemplate as ComboBox;
            ComboBox activityColumnTemplate = logGlacialList.Columns["activityColumn"].ActivatedEmbeddedControlTemplate as ComboBox;
            if (customerColumnTemplate == null)
                throw new Exception("Wrong customer column template");
            if (activityColumnTemplate == null)
                throw new Exception("Wrong activity column template");

            customerColumnTemplate.Items.Clear();
            customersComboBox.Items.Add("---- No filter ----");
            foreach (ObjectStruct customer in _service.GetCustomers(_settings["AdminID"]))
            {
                customersComboBox.Items.Add(customer);
                customerColumnTemplate.Items.Add(customer);
            }
            customerColumnTemplate.Sorted = true;

            activityColumnTemplate.Items.Clear();
            foreach (ObjectStruct activity in _service.GetActivities(_settings["AdminID"]))
            {
                activityColumnTemplate.Items.Add(activity);
            }
            activityColumnTemplate.Sorted = true;

            ((DateTimePicker)logGlacialList.Columns["dateColumn"].ActivatedEmbeddedControlTemplate).Format = DateTimePickerFormat.Short;
            ((DateTimePicker)logGlacialList.Columns["startTimeColumn"].ActivatedEmbeddedControlTemplate).Format = DateTimePickerFormat.Time;
            ((DateTimePicker)logGlacialList.Columns["startTimeColumn"].ActivatedEmbeddedControlTemplate).ShowUpDown = true;
            //((TextBox)logGlacialList.Columns["ticketColumn"].ActivatedEmbeddedControlTemplate).ReadOnly = true;
            ((NumericUpDown)logGlacialList.Columns["durationColumn"].ActivatedEmbeddedControlTemplate).Minimum = 0;
            ((NumericUpDown)logGlacialList.Columns["durationColumn"].ActivatedEmbeddedControlTemplate).Maximum = 999;
        }
Ejemplo n.º 2
0
 public Job(Settings Settings, ActivitiesEvidence Service, ObjectStruct Customer, ObjectStruct Activity, DateTime StartTime)
 {
     _timePeriods = new SortedList(1);
     _settings = Settings;
     _service = Service;
     _customer = Customer;
     _activity = Activity;
     _lastWorkPeriodStart = StartTime;
 }
Ejemplo n.º 3
0
        public ClaimPrepareForm(ActivitiesEvidence Service, R.Helpers.Settings Settings)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            _service = Service;
            _settings = Settings;
            claimWeekCalendar.Parent.Width = claimWeekCalendar.Width + 16;
        }
Ejemplo n.º 4
0
 public static LogForm GetInstance(ActivitiesEvidence WebService, Settings AppSettings)
 {
     if (_instance == null)
         _instance = new LogForm(WebService, AppSettings);
     return _instance;
 }