Пример #1
0
        ///
        /// Interface methods for User Controls
        ///

        public void Init(DateTime firstDayOfWeek)
        {
            Initialized = false;
            if (dbDetector == null)
            {
                dbDetector              = DBDetector.GetDBDetector();
                dbDetector.SiteChanged += new VWA4Common.DBDetectorEventHandler(dbDetector_SiteChanged);
                //dbDetector.PathChanged += new DBDetectorEventHandler(dbDetector_PathChanged);
                //dbDetector.WeekChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.DBPathChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.AdjustmentsChanged += new DBDetectorEventHandler(dbDetector_AdjustmentsChanged);
                dbDetector.UserLogin += new DBDetectorLoginEventHandler(dbDetector_UserLogin);
            }
            if (commonEvents == null)
            {
                commonEvents = VWA4Common.CommonEvents.GetEvents();
                commonEvents.UpdateProductUIData +=
                    new VWA4Common.UpdateProductUIDataEventHandler(commonEvents_UpdateProductUI);
            }
            // Initialize comboboxes
            cbGoalPriority.Items.Clear();
            cbGoalPriority.Items.Add(new ComboBoxItem("Urgent Priority", 3));
            cbGoalPriority.Items.Add(new ComboBoxItem("High Priority", 2));
            cbGoalPriority.Items.Add(new ComboBoxItem("Normal Priority", 1));
            cbGoalPriority.Items.Add(new ComboBoxItem("Low Priority", 0));

            cbGoalType.Items.Clear();
            cbGoalType.Items.Add(new ComboBoxItem("Dollar Amount", 0));
            cbGoalType.Items.Add(new ComboBoxItem("Weight Amount", 1));

            cbGoalMode.Items.Clear();
            cbGoalMode.Items.Add(new ComboBoxItem("Target Percentage Change", 0));
            cbGoalMode.Items.Add(new ComboBoxItem("Target Specific Amount", 1));


            cbFilterType.Items.Clear();
            cbFilterType.Items.Add(new ComboBoxItem("Food Type Tag Filter", 0));
            cbFilterType.Items.Add(new ComboBoxItem("Complex Filter", 1));


            //InitProductUI();
            ulvGoalList.ItemSettings.SelectionType = SelectionType.Single;
            _IsActive = true;
        }
Пример #2
0
        ///
        /// Interface methods for User Controls
        ///

        public void Init(DateTime firstDayOfWeek)
        {
            Initialized = false;
            if (dbDetector == null)
            {
                dbDetector = DBDetector.GetDBDetector();
                //dbDetector.PathChanged += new DBDetectorEventHandler(dbDetector_PathChanged);
                //dbDetector.WeekChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.DBPathChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.AdjustmentsChanged += new DBDetectorEventHandler(dbDetector_AdjustmentsChanged);
                dbDetector.UserLogin += new DBDetectorLoginEventHandler(dbDetector_UserLogin);
            }
            if (commonEvents == null)
            {
                commonEvents = VWA4Common.CommonEvents.GetEvents();
                commonEvents.UpdateProductUIData +=
                    new VWA4Common.UpdateProductUIDataEventHandler(commonEvents_UpdateProductUI);
            }
            _IsActive = true;
        }
Пример #3
0
        ///
        /// Interface methods for User Controls
        ///

        public void Init(DateTime firstDayOfWeek)
        {
            if (dbDetector == null)
            {
                dbDetector = DBDetector.GetDBDetector();
                //dbDetector.PathChanged += new DBDetectorEventHandler(dbDetector_PathChanged);
                dbDetector.DBPathChanged += new DBDetectorEventHandler(dbDetector_PathChanged);
                dbDetector.SiteChanged   += new DBDetectorEventHandler(dbDetector_SiteChanged);
                dbDetector.UserLogin     += new DBDetectorLoginEventHandler(dbDetector_UserLogin);
            }
            if (trackerDetector == null)
            {
                trackerDetector = VWA4Common.TrackerDetector.GetTrackerDetector();
                trackerDetector.TrackerConfigOutofSync += new VWA4Common.TrackerDetectorEventHandler(trackerDetector_TrackerConfigOutofSync);
                trackerDetector.WeekChanged            += new VWA4Common.WeekDetectorEventHandler(trackerDetector_WeekChanged);
            }
            commonEvents = VWA4Common.CommonEvents.GetEvents();

            _IsActive = true;
        }