Пример #1
0
 private void selectWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     isBusy_ = true;
     try
     {
         reSelect_ = null;
         LUtils.RemoveAllListRow(selectListView_);
         if (!App.ds_.prepareForSelect())
         {
             reportSelectMsg("准备数据工作失败,无法继续执行!", false);
             if (autoSelectMode())
             {
                 selectTask_.reportError("prepare work fail");
             }
             return;
         }
         SelectManager manager = new SelectManager();
         reSelect_ = manager.selectNow();
     }
     catch (Exception ex)
     {
         reSelect_ = null;
         reportSelectMsg(String.Format("执行发生异常:{0}", ex.Message), false);
         if (autoSelectMode())
         {
             selectTask_.reportError("raise exception: " + ex.Message);
         }
         throw;
     }
 }
Пример #2
0
 private void mainListView__ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (e.IsSelected)
     {
         int selDate = Utils.ToType <int>(e.Item.SubItems[1].Text);
         if (daySelectItems_ != null && daySelectItems_[0].date_ == selDate)
         {
             return;
         }
         daySelectItems_ = SelectResult.OfDate(selDate, re_.selItems_);
         daySelectItems_.Sort(delegate(SelectItem lhs, SelectItem rhs)
         {
             if (re_.buyItems_.Contains(lhs))
             {
                 return(-1);
             }
             if (re_.buyItems_.Contains(rhs))
             {
                 return(1);
             }
             return(rhs.getColumnVal("nsl").CompareTo(lhs.getColumnVal("nsl")));
         });
         LUtils.FillListViewData(subListView_, daySelectItems_);
     }
     else
     {
         LUtils.RemoveAllListRow(subListView_);
         daySelectItems_ = null;
     }
 }
Пример #3
0
        private void mainListView__ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            if (e.IsSelected)
            {
                int selDate = Utils.ToType <int>(e.Item.SubItems[1].Text);
                if (daySelectItems_ != null && daySelectItems_.Count > 0 && daySelectItems_[0].date_ == selDate)
                {
                    return;
                }
                daySelectItems_ = SelectResult.OfDate(selDate, re_.selItems_);
                App.grp_.makeDeside(daySelectItems_, selDate, RankBuyDesider.buyer_, false);

                LUtils.FillListViewData(subListView_, daySelectItems_);
            }
            else
            {
                LUtils.RemoveAllListRow(subListView_);
                daySelectItems_ = null;
            }
        }
Пример #4
0
 public void doSelectWork()
 {
     DB.Global().Execute(String.Format("Delete From autoselect"));
     LUtils.RemoveAllListRow(selectListView_);
     selectWorker.RunWorkerAsync();
 }