Exemplo n.º 1
0
    private void ShowSoft()
    {
        string fid = Request.QueryString["Fid"].ToString();

        LearnSite.Model.Soft model = new LearnSite.Model.Soft();
        LearnSite.BLL.Soft   bll   = new LearnSite.BLL.Soft();
        model = bll.GetModel(int.Parse(fid));
        DDLclass.SelectedValue    = model.Fclass;
        mcontent.InnerText        = HttpUtility.HtmlDecode(model.Fcontent);
        Texttitle.Text            = model.Ftitle;
        Linkold.CommandArgument   = model.Furl;
        Linkold.Text              = model.Furl.Substring(model.Furl.LastIndexOf("/") + 1);
        LabelFhit.Text            = model.Fhit.ToString();
        LabelFfiletype.Text       = model.Ffiletype;
        CheckBoxFhide.Checked     = model.Fhide;
        DDLopen.SelectedValue     = model.Fopen.ToString();
        ddlcategory.SelectedValue = model.Fyid.ToString();
        if (model.Fhid > 0)
        {
            CheckBoxFhid.Checked = false;
        }
        else
        {
            CheckBoxFhid.Checked = true;
        }
    }
Exemplo n.º 2
0
 private void ShowFile()
 {
     if (Request.QueryString["Fid"] != null)
     {
         string Fidstr = Request.QueryString["Fid"].ToString();
         if (LearnSite.Common.WordProcess.IsNum(Fidstr))
         {
             LabelFid.Text = Fidstr;
             LabelSid.Text = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString();
             int Fid = Int32.Parse(Fidstr);
             LearnSite.Model.Soft smodel = new LearnSite.Model.Soft();
             LearnSite.BLL.Soft   st     = new LearnSite.BLL.Soft();
             smodel             = st.GetModel(Fid);
             Labeltitle.Text    = smodel.Ftitle;
             Labelhit.Text      = smodel.Fhit.ToString();
             Labeldate.Text     = smodel.Fdate.ToString();
             Labelfiletype.Text = smodel.Ffiletype;
             string typestr = Labelfiletype.Text;
             if (typestr == "")
             {
                 typestr           = "read";
                 ImageDown.Visible = false;
             }
             ImageType.ImageUrl = "~/Images/FileType/" + typestr.ToLower() + ".gif";
             Labelclass.Text    = smodel.Fclass;
             HLurl.NavigateUrl  = smodel.Furl;
             Labelopen.Text     = smodel.Fopen.ToString();
             Labelcontent.Text  = HttpUtility.HtmlDecode(smodel.Fcontent);
             LabelFyid.Text     = smodel.Fyid.ToString();
             LBtnfile.Visible   = false;
             st.UpdateFhit(Fid);
         }
     }
 }
Exemplo n.º 3
0
 private void ShowFile()
 {
     if (Request.QueryString["Fid"] != null)
     {
         string Fidstr = Request.QueryString["Fid"].ToString();
         if (LearnSite.Common.WordProcess.IsNum(Fidstr))
         {
             int Fid = Int32.Parse(Fidstr);
             LearnSite.Model.Soft smodel = new LearnSite.Model.Soft();
             LearnSite.BLL.Soft st = new LearnSite.BLL.Soft();
             smodel = st.GetModel(Fid);
             Labeltitle.Text = smodel.Ftitle;
             Labelcontent.Text = HttpUtility.HtmlDecode(smodel.Fcontent);
             Labelhit.Text = smodel.Fhit.ToString();
             Labeldate.Text = smodel.Fdate.ToString();
             Labelfiletype.Text = smodel.Ffiletype;
             string typestr = Labelfiletype.Text;
             if (typestr == "")
             {
                 typestr = "read";
                 ImageDown.Visible = false;
             }
             ImageType.ImageUrl = "~/Images/FileType/" + typestr.ToLower() + ".gif";
             Labelclass.Text = smodel.Fclass;
             HLurl.NavigateUrl = smodel.Furl;
             LBtnfile.Visible = false;
             st.UpdateFhit(Fid);
         }
     }
 }