123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- public partial class DisplayOth : System.Web.UI.Page
- {
- LYS.UserData1 myud = new LYS.UserData1();
- string username = "";
- string usertype = "";
- string userdemp = "";
- string utype = "";
- string OP = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- string myURL = myud.GetAddressUrl().ToString();
- if (Session["UserName"] != null)
- {
- username = Session["UserName"].ToString();
- usertype = Session["UserType"].ToString();
- userdemp = Session["UserDemp"].ToString();
- }
- else
- if (myud.ReadCookies("UserName").Trim().Length > 0)
- {
- username = myud.ReadCookies("UserName").Trim();
- usertype = myud.ReadCookies("UserType").Trim();
- userdemp = myud.ReadCookies("UserDemp").Trim();
- }
- else
- {
- // Response.Redirect("LoginNew.aspx");
- }
- // string sql = "select * from TKJL where 督导姓名='kcm' and 教师姓名='张XX' and 听课日期=#" + Convert.ToDateTime("2017年9月8日").ToShortDateString() + "#";
- //if (Session["Username"] == null)
- //{ Response.Redirect("LoginNew.aspx"); }
- //以下为督导员登录显示
- // Literal1.Text = myud.DispLineData("Select ID,教师姓名,系部,课程名,督导姓名,点评评价,总评分 from TKJL where 督导姓名='" + Session["Username"].ToString() + "' order by 听课日期 Desc").ToString();
- //以下全部显示(超级管理员),最好在页面中添加一个查询功能,可以查询系部,教师,或者听课时间
- //if (Request.QueryString["Type"].ToString() !="" || Request .QueryString ["Type"].Equals (null))
- if (Request.QueryString.Count > 0)
- {
- if (myURL.LastIndexOf("Type") < 0 || myURL.LastIndexOf("OP") < 0)
- {
- Response.Write("<script>alert('错误!参数不正确!不能正常显示')</script>");
- Response.End();
- }
- else
- {
- utype = Request.QueryString["Type"].ToString().Trim();
- OP = Request.QueryString["OP"].ToString().Trim();
- }
- // Response.Write("u=" + utype + "OP=" + OP);
- switch (utype)
- {
- //case "Tea":
- // {
- // //Literal1.Text = myud.DispLineData("Select ID,教师姓名,系部,课程名,督导姓名,综合评价,总评分 from TKJL where 教师姓名='"+username+"' order by 教师姓名").ToString();
- // Literal1.Text = myud.DispLineDataadmin("Select ID,教师姓名,系部,课程名,听课日期,班级,综合评价 from TKJL where 综合评价 IS NOT NULL and 教师姓名='" + username + "' order by 教师姓名").ToString();
- // //Response.Write("userdemp=" + userdemp);
- // }
- // break;
-
- case "dd":
- {
- if (OP.Trim() == "dispother")
- {//显示综合评价
- Literal1.Text = myud.DispLineDataModi("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg where 督导内容 IS NOT NULL and 系部='" + userdemp + "' and 督导姓名='" + username + "' order by 督导时间 Desc", OP).ToString();
- }
- if (OP.Trim() == "dispzhpj")
- {//显示综合评价
- Literal1.Text = myud.DispLineDataModi("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg where 督导内容 IS NOT NULL and 系部='" + userdemp + "' order by 督导时间 Desc", OP).ToString();
- }
- if (OP.Trim() == "disppj")
- {
- //显示评价
- Literal1.Text = myud.DispLineDataModi("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg where 督导姓名='" + username + "' and 系部='" + userdemp + "' order by 督导时间 Desc", OP).ToString();
- }
- if (OP.Trim() == "modi")
- {
- //可以进行修改DispLineData
- Literal1.Text = myud.DispLineDataModi("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg where 督导姓名='" + username + "' and 系部='" + userdemp + "' order by 督导时间 Desc", OP).ToString();
- }
- }
- break;
- case "xbadmin":
- {
- // Literal1.Text = myud.DispLineData("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg where 系部='" + userdemp + "' order by 督导时间 Desc").ToString();
- if (OP.Trim() == "dispother")
- {//显示综合评价
- Literal1.Text = myud.DispLineDataModi("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg where 督导内容 IS NOT NULL and 系部='" + userdemp + "' order by 督导时间 Desc", OP).ToString();
- }
- }
- break;
- case "xyadmin":
- {
- Literal1.Text = myud.DispLineData("Select ID,督导姓名,系部,督导项目名,督导时间,星期,节次,督导地点,督导内容,建议或结果 from OthProg order by 督导时间 Desc").ToString();
- }
- break;
- // Literal1.Text = myud.DispLineData(sql).ToString();
- }
- }
- else
- {
- Response.Redirect("LoginNew.aspx");
- }
- // Response.Write("userdemp=" + "Select ID,教师姓名,系部,课程名,督导姓名,点评评价,总评分 from TKJL where 督导姓名='" + username + "' and 系部='" + userdemp + "' order by 听课日期 Desc");
- }
- }
|