Example #1
0
        public static void addAward(int uid, int point, string reason, string reasonid)
        {
            if (uid == 0)
            {
                return;
            }

            m_stat.AddReward(uid, point);
            m_summary.AddAward(uid, point);

            //清理最后一次奖励时间
            foreach (StudentLasttimeReward item in m_rewardTimeList)
            {
                if (item.uid == uid)
                {
                    item.minute = 0;
                }
            }

            StudentReward sr = new StudentReward();

            sr.uid   = uid;
            sr.point = point;

            bool bFound = false;

            foreach (StudentReward _sr in m_rewardList)
            {
                if (_sr.uid == uid)
                {
                    _sr.point += point;
                    bFound     = true;
                    break;
                }
            }
            if (!bFound)
            {
                m_rewardList.Add(sr);
            }
        }
Example #2
0
        public Stat()
        {
            handon   = new Stat_Handon();
            xiti     = new Stat_Xiti();
            reward   = new Stat_Reward();
            callname = new Stat_Callname();
            foreach (User si in Global.g_Studentlist)
            {
                StudentReward item = new StudentReward();
                item.uid      = si.id;
                item.name     = si.name;
                item.imageurl = si.imageurl;
                reward.list.Add(item);

                StudentCallname sc = new StudentCallname();
                sc.uid      = si.id;
                sc.name     = si.name;
                sc.imageurl = si.imageurl;
                sc.point    = 0;
                callname.list.Add(sc);
            }
        }