Example #1
0
 private void PageBind(int indexId)
 {
     Tunnel.Model.Tunnel_index model = new Tunnel.Model.Tunnel_index();
     Tunnel.BLL.Tunnel_Index   index = new Tunnel.BLL.Tunnel_Index();
     model         = index.GetModel(indexId);
     tb_Title.Text = model.Title;
     DropDownList1.SelectedValue = model.TypeId.ToString();
     FCKeditor.Value             = model.Content;
 }
Example #2
0
 private void PageBind(int indexId)
 {
     Tunnel.Model.Tunnel_index model = new Tunnel.Model.Tunnel_index();
     Tunnel.BLL.Tunnel_Index   index = new Tunnel.BLL.Tunnel_Index();
     model         = index.GetModel(indexId);
     tb_Title.Text = model.Title;
     DropDownList1.SelectedValue = model.TypeId.ToString();
     FCKeditor.Value             = model.Content;
     if (!model.Files.Equals(""))
     {
         Label3.Visible = false;
         Label2.Visible = true;
         Label4.Visible = true;
         Label2.Text    = "<br/>附件名:" + model.Files.Substring(model.Files.LastIndexOf("\\") + 1);
         Label3.Text    = model.Files;
     }
     else
     {
         Label3.Visible = false;
         Label2.Visible = false;
         Label4.Visible = false;
     }
     if (model.ReadUser.Trim() != "")
     {
         lblUserID.Text = model.ReadUser.Trim();
         string[] strUser = lblUserID.Text.Trim().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         lblUser.Text = "浏览人:";
         for (int i = 0; i < strUser.Length; i++)
         {
             lblUser.Text += ShowUserName(strUser[i]) + ",";
         }
         lblUser.Text       = lblUser.Text.Trim().Substring(0, lblUser.Text.Trim().Length - 1);
         lblUser.Visible    = true;
         lblUserMes.Visible = true;
     }
     else
     {
         lblUser.Visible    = false;
         lblUserMes.Visible = false;
     }
     //tb_toname.Text = model.ReadUser.Trim();
 }
Example #3
0
    public string TitleHerfUrl(int id, string title)
    {
        string type = DropDownList1.SelectedItem.Text.Trim();
        string url  = "";

        switch (type)
        {
        case "新闻":
            url = "<a href='../N_News/N_News/N_NewView.aspx?Id=" + id + "&TypeId=0'>" + title + "</a>";
            break;

        case "公告":
            url = "<a href='../N_News/N_Bulletin/N_GonggaoView.aspx?Id=" + id + "&TypeId=1'>" + title + "</a>";
            break;

        case "科室信息":
            Tunnel.BLL.Tunnel_Index ix    = new Tunnel.BLL.Tunnel_Index();
            Tunnel_index            model = new Tunnel_index();
            model = ix.GetModel(id);
            url   = "<a href='ViewIndex.aspx?Id=" + id + "&TypeId=" + model.TypeId + "&lanmuId=1'>" + title + "</a>";
            break;

        case "公文":
            url = "<a href='../N_WorkFlow/ODocument/Document_View.aspx?lid=" + Tunnel.Data.DESEncrypt.Encrypt(id.ToString()) + "'>" + title + "</a>";
            break;

        case "档案":
            url = title;
            break;

        case "图片":
            url = "<a href='../N_WorkFlow/ODocument/Document_View.aspx?lid=" + Tunnel.Data.DESEncrypt.Encrypt(id.ToString()) + "'>" + title + "</a>";
            break;
        }
        return(url);
    }
Example #4
0
    public string iffile(object o)
    {
        Tunnel.BLL.Tunnel_Index   ti  = new Tunnel.BLL.Tunnel_Index();
        Tunnel.Model.Tunnel_index tii = new Tunnel_index();
        tii = ti.GetModel(Convert.ToInt32(o.ToString()));

        if (!string.IsNullOrEmpty(tii.Files))
        {
            return("<font color=red>有</font>");
        }
        else
        {
            return("无");
        }

        //string filelist = tii.Files;
        //int i = 0;
        //string filecontent = "";
        //if (filelist != "")
        //{
        //    string[] filearr = filelist.Split(',');
        //    foreach (string file in filearr)
        //    {
        //        if (file != "")
        //        {
        //            i++;
        //            filecontent += Tunnel.Common.GetValue.getfu(file, "", i);
        //        }
        //    }
        //    return filecontent;
        //}
        //else
        //{
        //    return "&nbsp;";
        //}
    }