Example #1
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;
     }
 }
Example #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_.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;
            }
        }