Esempio n. 1
0
        public FrmLabelEditor(Models.ElementLabel lbl)
        {
            InitializeComponent();
            elbo = new BO.ElementLabelBO();
            if (lbl.LabelId == 0)
            {
                _lbl = new Models.ElementLabel();
            }
            else
            {
                _lbl          = elbo.GetLabel(lbl.LabelId);
                _lbl.ActionId = lbl.ActionId;
            }
            var abo = new BO.ActionBO();

            _action = abo.GetAction(_lbl.ActionId);
        }
Esempio n. 2
0
        void RunCrawler()
        {
            Models.WebAction actGetHtml, actClickSearch, actEnterData, actBrowse, actWebRoomTypes,
                             actClickCmbRoomTypes;
            var abo = new BO.ActionBO();

            actGetHtml           = abo.GetAction(22);
            actClickSearch       = abo.GetAction(21);
            actEnterData         = abo.GetAction(20);
            actBrowse            = abo.GetAction(18);
            actWebRoomTypes      = abo.GetAction(38);
            actClickCmbRoomTypes = abo.GetAction(39);
            objGetHtml           = new Objects.WebActionObject(actGetHtml);
            objClick             = new Objects.WebActionObject(actClickSearch);
            objEnterData         = new Objects.WebActionObject(actEnterData);
            objBrowse            = new Objects.WebActionObject(actBrowse);
            objGetWebRoomTypes   = new Objects.WebActionObject(actWebRoomTypes);
            objClickCmbRoomTypes = new Objects.WebActionObject(actClickCmbRoomTypes);
            objBrowse._wk        = objGetHtml._wk = objEnterData._wk = objEnterData._wk = objClick._wk = _wk;
            foreach (var h in _selectedHotels)
            {
                if (string.IsNullOrEmpty(h.HMSID))
                {
                    MessageBox.Show("null or empty hmsId for hotel " + h.HotelName);
                }
            }
            for (int i = 0; i < _selectedHotels.Count; i++)
            {
                if (_wk.CancellationPending)
                {
                    break;
                }
                CrawlSingleHotel(_selectedHotels[i]);
            }
            var bld = new StringBuilder();

            if (bld.Length > 0)
            {
                _wk.ReportProgress(0, Environment.NewLine + bld.ToString());

                /* Nov 27: Text just not display
                 * Console.WriteLine(bld.ToString());
                 * var viewer = new frmStringViewer(bld.ToString());
                 * viewer.Show();*/
            }
        }
Esempio n. 3
0
 public FrmActionEditor(int actionId)
 {
     InitWindow();
     _action = abo.GetAction(actionId);
 }