public static DailyMissionController GetMission(String userid, Int32 MissionId)
    {
        List <DailyMissionController> list = DailyMissionsController.GetMissionList(userid);

        foreach (DailyMissionController tmp in list)
        {
            if (tmp.Id == MissionId)
            {
                return(tmp);
            }
        }

        return(null);
    }
    public static List <DailyMissionController> GetMissionList(String userid)
    {
        List <DailyMissionController> control_list = new List <DailyMissionController>();
        DailyMissionsController       Controller   = new DailyMissionsController(userid);
        List <DailyMissionModel>      model_list   = Controller.m_pDb.GetDailyMissionList();

        foreach (DailyMissionModel model in model_list)
        {
            DailyMissionController c = new DailyMissionController(model, Controller.m_pDb);
            control_list.Add(c);
        }

        return(control_list);
    }
    protected void DailyMissionRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (e.CommandName == "completeMission")
        {
            String Text = null;
            Int32 MissionId = Convert.ToInt32(e.CommandArgument);

            DailyMissionController Controller = DailyMissionsController.GetMission(m_szUserId, MissionId);

            Controller.SetDone();

            Text = "完成任务\"" + Controller.Name + "\", 获得积分" + Controller.Award + "分";
            RecordController.AddDetail(m_szUserId, ModelParam.POINT_GET_RECORD_ID, Text, Controller.Award);

            DailyMissionRepeater.DataBind();

            ClientScript.RegisterStartupScript(ClientScript.GetType(),
                "GetAwardScript",
                "<script>swal('" + Text + "').then((value) => {window.location.href='Mission.aspx';});</script>");
        }
    }