45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using Ajax;
|
|
using System.Data;
|
|
using System.Collections;
|
|
public partial class Schedule : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (Session["user"] == null)
|
|
{
|
|
Response.Redirect("../index.aspx");
|
|
}
|
|
getgxxnr();
|
|
}
|
|
|
|
private void getgxxnr()
|
|
{
|
|
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
|
|
string htmlcode = "<table class='table table-bordered table-header'> <thead> <tr> <td class='w20'>日程标题</td><td class='w50'>日程内容</td> <td class='w10'>待办日期</td> <td class='w10'>日程发布人</td><td class='w10'>日志类型</td> </tr> </thead>";
|
|
string wherecode = string.Format("select * from nr_z_Mricheng where rzname='" + user.zhanghao + "' or lx='新闻公告' or lx='" + user.zhanghao + "' order by dbrq desc");
|
|
DataTable rzdt = DBHlper.Execute(wherecode).Tables[0];
|
|
if (rzdt.Rows.Count == 0)
|
|
{
|
|
htmlcode += "<tr><td colspan='2'>   没有数据</td></tr>";
|
|
}
|
|
for (int i = 0; i < rzdt.Rows.Count; i++)
|
|
{
|
|
htmlcode += "<tr><td>" + rzdt.Rows[i]["rzbt"] + "</td><td>" + rzdt.Rows[i]["rznr"] + "</td><td>" + rzdt.Rows[i]["dbrq"] + "</td><td>" + rzdt.Rows[i]["rzname"] + "</td>";
|
|
if (rzdt.Rows[i]["lx"].ToString() == "新闻公告" || rzdt.Rows[i]["lx"].ToString() == "我的日程")
|
|
{
|
|
htmlcode += "<td>" + rzdt.Rows[i]["lx"] + "</td></tr>";
|
|
}
|
|
else
|
|
{
|
|
htmlcode += "<td>个人消息</td></tr>";
|
|
}
|
|
}
|
|
txxxdiv.InnerHtml = htmlcode + "</table>";
|
|
}
|
|
} |