예제 #1
0
        public void LoadData()
        {
            StringPairList DataList = new StringPairList();

            DataManager.Public.PersonRewardPunishInfoModel model = new DataManager.Public.PersonRewardPunishInfoModel();

            List <PersonRewardPunishInfo> ppilist = model.GetPersonRewardPunishInfos("", "", nameid, fromdate, todate, "order by RPTIME ");

            if (ppilist.Count > 0)
            {
                this.chartTitle.Content = ppilist[0].NAME + " 的量化数据走势图";
            }
            double tatolScore = 0;

            foreach (PersonRewardPunishInfo ppi in ppilist)
            {
                string datestr = "";
                try
                {
                    datestr = Convert.ToDateTime(ppi.RPTIME).ToString("yyyy-MM-dd");
                }
                catch
                {
                }


                foreach (StringPair tempsp in DataList.SPList)
                {
                    if (tempsp.Key == datestr)
                    {
                        tempsp.Value = (Convert.ToDouble(tempsp.Value) + ppi.FRACTION).ToString();

                        continue;
                    }
                }

                StringPair sp = new StringPair();



                sp.Key = datestr;


                tatolScore = tatolScore + ppi.FRACTION;
                sp.Value   = tatolScore.ToString();


                DataList.SPList.Add(sp);
            }
            this.Series.DataSource = null;
            this.Series.DataSource = DataList.SPList;
        }
        public void LoadData()
        {
            this.dg_GrouperList.ItemsSource = null;

            List <PersonRewardPunishInfo> itemPersonList;


            DataManager.Public.PersonRewardPunishInfoModel model = new DataManager.Public.PersonRewardPunishInfoModel();
            itemPersonList = model.GetPersonRewardPunishInfos("", incident, nameid, fromdate, todate, "");

            if (itemPersonList != null && itemPersonList.Count > 0)
            {
                this.dg_GrouperList.ItemsSource = itemPersonList.Where(item => !string.IsNullOrEmpty(item.NAME));
            }
        }