private void ShowIpWorkDone()
    {
        if (Request.Cookies["StudentCookies"] != null)
        {
            if (Request.QueryString["Mid"] != null)
            {
                string Sgrade = Request.Cookies["StudentCookies"].Values["Sgrade"].ToString();
                string Sclass = Request.Cookies["StudentCookies"].Values["Sclass"].ToString();
                string Snum = Request.Cookies["StudentCookies"].Values["Snum"].ToString();
                string Wip = Request.Cookies["StudentCookies"].Values["LoginIp"].ToString();
                if (Request.QueryString["Mcid"] != null)
                {
                    string Wcid = Request.QueryString["Mcid"].ToString();
                    string Wmid = Request.QueryString["Mid"].ToString();
                    if (LearnSite.Common.WordProcess.IsNum(Wcid) && LearnSite.Common.WordProcess.IsNum(Wmid))
                    {
                        LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
                        string SnumDone = ws.IpWorkDoneSnum(Int32.Parse(Sgrade), Int32.Parse(Sclass), Int32.Parse(Wcid), Int32.Parse(Wmid), Wip);
                        if (SnumDone == "")
                        {
                            if (LabelMfiletype.Text != "html")
                            {
                                Labelmsg.Text = DateTime.Now.ToShortDateString();
                            }
                        }
                        else
                        {
                            if (Snum != SnumDone)
                            {
                                if (LearnSite.Common.XmlHelp.GetWorkIpLimit())
                                {
                                    AttachFile.Enabled = false;
                                    Btnupload.Enabled = false;//如果作品提交设定为IP限制的话,提交按钮灰色失效
                                    Labelmsg.Text = SnumDone + "学号<br/>已经在该IP提交本任务作品!";
                                }
                                Labelmsg.Text = SnumDone + "学号<br/>已经在该IP提交本任务作品!";
                            }
                            else
                            {
                                if (Session[Snum] != null)
                                {
                                    AttachFile.Enabled = false;
                                    Btnupload.Enabled = false;
                                    Labelmsg.Text = "你已经参加投票活动!<br/>你不可以重新提交了!";
                                }
                                else
                                {
                                    Labelmsg.Text = "你可以修改作品";

                                }
                            }
                        }
                        string Wid = ws.WorkDone(Snum, Int32.Parse(Wcid), Int32.Parse(Wmid));//返回空字符表示不存在该记录
                        if (Wid != "")
                        {
                            //如果作品已经评分,提交按钮灰色失效
                            if (ws.IsChecked(Int32.Parse(Wid)))
                            {
                                Labelmsg.Text = "该作品已经评分!";
                                Btnupload.Enabled = false;
                                AttachFile.Enabled = false;
                                CheckBoxCan.Enabled = false;
                            }
                        }
                        else
                        {
                            if (CheckBoxMupload.Checked)
                            {
                                Labelmsg.Text =Labelmsg.Text+ "<br/>你未提交该作品?";
                            }
                        }
                    }
                    else
                    {
                        Panelworks.Visible = false;
                        Labelmsg.Text = "网页超时过期!";
                    }
                }
            }
        }
    }