protected void Page_Load(object sender, EventArgs e) { Modelx m = new Modelx(); msbase ms = new msbase(); DataTable dt = null; ArrayList al = new ArrayList(); string uid = Request["UserID"]; Session["uid"] = uid; if (uid == null || m.getUserTypeByUserID(uid) ==null|| !m.getUserTypeByUserID(uid).Equals("T")) { Session["uid"] = null; Context.Response.Redirect("http://oa.chsx.cn/ISchoolOs/mainlogin.aspx"); } //string uid = m.UID; m.setNewWeek(); decimal pSerID = m.getPSerIDByUserID(uid); string sqlstm = "select * from YXZ_stuAppt where pSerID=" + pSerID + " order by weeknum desc;"; dt = ms.SelectSql(sqlstm); for (int i = 0; i < dt.Rows.Count;i++) { Modelx.stuAppt stu = new Modelx.stuAppt(); stu.SerID = Convert.ToDecimal(dt.Rows[i][0]); stu.UserID = m.getStuIDBySerID(stu.SerID); stu.StuName = m.getSnameBySerID(stu.SerID); stu.semavail = Convert.ToInt32(dt.Rows[i][1]); stu.pSerID = Convert.ToDecimal(dt.Rows[i][2]); stu.date = Convert.ToDateTime(dt.Rows[i][3]); stu.status = Convert.ToInt32(dt.Rows[i][4]); stu.weeknum = Convert.ToInt32(dt.Rows[i][5]); al.Add(stu); } Context.Items["al"] = al; }
protected void Page_Load(object sender, EventArgs e) { Modelx m = new Modelx(); msbase ms = new msbase(); DataTable dt = null; ArrayList al = new ArrayList(); string uid = Request["UserID"]; Session["uid"] = uid; if (uid == null || m.getUserTypeByUserID(uid) == null || !m.getUserTypeByUserID(uid).Equals("T")) { Session["uid"] = null; Context.Response.Redirect("http://oa.chsx.cn/ISchoolOs/mainlogin.aspx"); } //string uid = m.UID; m.setNewWeek(); decimal pSerID = m.getPSerIDByUserID(uid); string sqlstm = "select * from YXZ_stuAppt where pSerID=" + pSerID + " order by weeknum desc;"; dt = ms.SelectSql(sqlstm); for (int i = 0; i < dt.Rows.Count; i++) { Modelx.stuAppt stu = new Modelx.stuAppt(); stu.SerID = Convert.ToDecimal(dt.Rows[i][0]); stu.UserID = m.getStuIDBySerID(stu.SerID); stu.StuName = m.getSnameBySerID(stu.SerID); stu.semavail = Convert.ToInt32(dt.Rows[i][1]); stu.pSerID = Convert.ToDecimal(dt.Rows[i][2]); stu.date = Convert.ToDateTime(dt.Rows[i][3]); stu.status = Convert.ToInt32(dt.Rows[i][4]); stu.weeknum = Convert.ToInt32(dt.Rows[i][5]); al.Add(stu); } Context.Items["al"] = al; }
protected void Page_Load(object sender, EventArgs e) { Modelx m = new Modelx(); //string uid = m.UID; //string uid=(string)Session["uid"]; //string UserSerIDen = (string )Session["UserSerID"]; //string UserSerIDen = Request["UserSerID"]; string uid = Request["UserID"]; if (uid == null) { uid = (string)Session["uid"]; } //if (UserSerIDen == null) { Response.Redirect("Login.aspx"); } if (uid != null) { //UserSerID = encryption.DeCode(UserSerIDen); //string UserSerID = "104165"; string UserSerID = m.getPSerIDByUserID(uid).ToString(); DataTable dt = ms.SelectSql("select * from v_userlist where UserSerID='" + UserSerID + "'"); if (dt.Rows.Count > 0) { UserType = dt.Rows[0]["UserType"].ToString(); } DataTable dm = ms.SelectSql("select * from v_userlist2 where UserSerID='" + UserSerID + "'"); if (dm.Rows.Count > 0) { userphoto = dm.Rows[0]["userphoto"].ToString(); teaname = dm.Rows[0]["TeaName"].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { Modelx m = new Modelx(); //string uid = m.UID; //string uid=(string)Session["uid"]; //string UserSerIDen = (string )Session["UserSerID"]; //string UserSerIDen = Request["UserSerID"]; string uid = Request["UserID"]; if (uid == null) { uid =(string) Session["uid"]; } //if (UserSerIDen == null) { Response.Redirect("Login.aspx"); } if (uid != null) { //UserSerID = encryption.DeCode(UserSerIDen); //string UserSerID = "104165"; string UserSerID = m.getPSerIDByUserID(uid).ToString(); DataTable dt = ms.SelectSql("select * from v_userlist where UserSerID='" + UserSerID + "'"); if (dt.Rows.Count > 0) { UserType = dt.Rows[0]["UserType"].ToString(); } DataTable dm = ms.SelectSql("select * from v_userlist2 where UserSerID='" + UserSerID + "'"); if (dm.Rows.Count > 0) { userphoto = dm.Rows[0]["userphoto"].ToString(); teaname = dm.Rows[0]["TeaName"].ToString(); } } }