public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //基础html string strHtml = ""; //获取传递过来的参数 并 拼接筛选条件 string strWhere = GetFormStringANDCondition(); StudentProvinceId = 11; int StudentId = Basic.RequestHelper.GetFormInt("StudentId", 0); int StudentKeLei = Basic.RequestHelper.GetFormInt("StudentKeLei", 5); StudentPiCi = Basic.RequestHelper.GetFormInt("StudentPiCi", 1); int StudentPcLeiBie = Basic.RequestHelper.GetFormInt("StudentPcLeiBie", 0); int WeiCi = Basic.RequestHelper.GetFormInt("weici", 0); int FenShu = Basic.RequestHelper.GetFormInt("fenshu", 0); Entity.ProvinceConfig config = DAL.ProvinceConfig.ProvinceConfigEntityGet(StudentProvinceId); Entity.StudentGaoKaoHistory_ZheJiang history = DAL.StudentGaoKaoHistory_ZheJiang.StudentGaoKaoHistory_ZheJiangEntityGetByStudentId(StudentId); Entity.FenShuXian fenshuxian = DAL.FenShuXian.FenShuXianEntityGet(StudentProvinceId, " AND KeLei = " + StudentKeLei + " AND DataYear = " + config.LatestProvinceWeiCiYear); int FirstPiCiWeiCi = DAL.ProvinceWeiCi.ProvinceWeiCiEntityGetByFenShu(fenshuxian.PcFirst, config.LatestProvinceWeiCiYear, StudentProvinceId, StudentKeLei).WeiCi; // Entity.StudentChengJi studentChengJi = DAL.CommonTuiJian.GetUserPiCi(fenshuxian, FenShu, config.LatestProvinceWeiCiYear, StudentProvinceId, StudentKeLei); int XianCha = 0; if (StudentPiCi == 0)//浙江提前批的线差和一批次的线差一样 { XianCha = DAL.CommonTuiJian.GetUserPiCiXianCha(fenshuxian, FenShu, 1); } else { XianCha = DAL.CommonTuiJian.GetUserPiCiXianCha(fenshuxian, FenShu, StudentPiCi); } DataTable dt = DAL.CommonTuiJian.FenShengYuanXiaoLuQuList(strWhere, StudentProvinceId, StudentId, StudentKeLei, StudentPiCi, StudentPcLeiBie, XianCha, 0, 0); //給DataTable dt.Columns.Add("BaoKaoTuiJian", typeof(int)); foreach (DataRow dr in dt.Rows) { dr["BaoKaoTuiJian"] = DAL.CommonTuiJian.ShowSuggest(StudentProvinceId, StudentPiCi, FirstPiCiWeiCi, WeiCi, Basic.Utils.StrToInt(dr["glZuiXiaoWeiCi"].ToString(), 0), Basic.Utils.StrToInt(dr["glZuiDaWeiCi"].ToString(), 0), Basic.Utils.StrToInt(dr["glPingJunWeiCi"].ToString(), 0), XianCha, Basic.Utils.StrToInt(dr["PiCiXian"].ToString(), 0), Basic.Utils.StrToInt(dr["glZuiGaoFen"].ToString(), 0), Basic.Utils.StrToInt(dr["glZuiDiFen"].ToString(), 0), Basic.Utils.StrToInt(dr["glPingJunFen"].ToString(), 0)); } DataView dv = dt.DefaultView; dv.Sort = "BaoKaoTuiJian ASC"; DataTable dt2 = dv.ToTable(); strHtml += GetBaseHtml(); strHtml += GetSchoolHtml(dt2);//院校相关html context.Response.Write(strHtml); //ShowSuggestImg(int.Parse(Eval("glZuiXiaoWeiCi").ToString()), int.Parse(Eval("glZuiDaWeiCi").ToString()), int.Parse(Eval("glPingJunWeiCi").ToString()), int.Parse(Eval("PiCiXian").ToString()), int.Parse(Eval("glZuiGaoFen").ToString()), int.Parse(Eval("glZuiDiFen").ToString()),int.Parse(Eval("glPingJunFen").ToString()))%> }
protected void Button1_Click(object sender, EventArgs e) { int KeLei = Basic.RequestHelper.GetFormInt("ddlKeLei", -1); if (KeLei == -1 && userinfo.KeLei == -1) { Basic.MsgHelper.AlertBackMsg("设置分数时,必须设置科类。"); } if (userinfo.KeLei == -1) { DAL.Join_Student.Join_StudentWenLi(userinfo.StudentId, KeLei); Basic.CookieHelper.WriteCookie("Student", "KeLei", KeLei.ToString(), 120); } int intYuWen = Basic.RequestHelper.GetFormInt(txtYuWen.ClientID, 0); int intShuXue = Basic.RequestHelper.GetFormInt(txtShuXue.ClientID, 0); int intYingYu = Basic.RequestHelper.GetFormInt(txtYingYu.ClientID, 0); int intZongHe = Basic.RequestHelper.GetFormInt(txtZongHe.ClientID, 0); int intZiXuan = Basic.RequestHelper.GetFormInt(txtZiXuan.ClientID, 0); int intJiShu = Basic.RequestHelper.GetFormInt(txtJiShu.ClientID, 0); Entity.StudentGaoKaoHistory_ZheJiang info = new Entity.StudentGaoKaoHistory_ZheJiang(); info.AddTime = DateTime.Now; info.JiShu = intJiShu; info.ShuXue = intShuXue; info.StudentId = userinfo.StudentId; info.YingYu = intYingYu; info.YuWen = intYuWen; info.ZiXuan = intZiXuan; info.ZongFen1 = Basic.TypeConverter.StrToInt(hidZongFen1.Value, 0); info.ZongFen2 = Basic.TypeConverter.StrToInt(hidZongFen2.Value, 0); info.ZongFen3 = Basic.TypeConverter.StrToInt(hidZongFen3.Value, 0); info.ZongHe = intZongHe; info.IsGaoKao = 0; info.IsLatest = 1; //开始进行保存了 DAL.StudentGaoKaoHistory_ZheJiang.StudentGaoKaoHistory_ZheJiangAdd(info); Basic.MsgHelper.AlertUrlMsg("您已经成功设置平时考试成绩,请使用相关功能。", "/tuijian/default.aspx"); }
void Bind() { hidKeLei.Value = userinfo.KeLei.ToString(); Entity.GaoKaoCard info = DAL.GaoKaoCard.GaoKaoCardEntityGetByStudentId(userinfo.StudentId); if (info != null) { string strTiXing1 = ""; Entity.StudentGaoKaoHistory_ZheJiang infoChengJi = DAL.StudentGaoKaoHistory_ZheJiang.StudentGaoKaoHistory_ZheJiangEntityGetByStudentId(userinfo.StudentId); if (infoChengJi != null) { strTiXing1 = "<div class=\"tx\">" + "提醒:" + Basic.Utils.StrToDateStr(infoChengJi.AddTime.ToString()) + "你设定分数如下" + " </div>" + " <div class=\"gkcjul\">" + " <ul>" + " <li>科类:" + DAL.Common.GetKeLeiMingCheng(userinfo.KeLei) + "</li>" + " <li>语文:" + infoChengJi.YuWen + "</li>" + " <li>数学:" + infoChengJi.ShuXue + "</li>" + " <li>外语:" + infoChengJi.YingYu + "</li>" + " <li>综合:" + infoChengJi.ZongHe + "</li>" + " <li>自选:" + infoChengJi.ZiXuan + "</li>" + " <li>技术:" + infoChengJi.JiShu + "</li>" + " <li>总分1:" + infoChengJi.ZongFen1 + "</li>" + " <li>总分2:" + infoChengJi.ZongFen2 + "</li>" + " <li>总分3:" + infoChengJi.ZongFen3 + "</li>"; strTiXing1 += " </ul></div>"; } else { strTiXing1 = "<div class=\"tx\">" + "提醒:你还没有设定成绩" + " </div>"; } ltlTiXing1.Text = strTiXing1; } }
void page_Loading(object sender, EventArgs e) { #region 用户登录信息 userinfo.StudentId = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "StudentId"), 0); userinfo.StudentLevel = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "StudentLevel"), 0); //用户等级id:1普通注册用户;2高考查看卡; 3普通测试卡; 4普通卡; 5VIP测试卡; 6VIP卡;9会员卡 userinfo.ProvinceId = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "ProvinceId"), 0); //省份id userinfo.KeLei = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "KeLei"), 0); //科类 userinfo.GKYear = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "GKYear"), 0); //参加高考的年份 userinfo.Status = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "Status"), 0); //登陆之后的状态值 userinfo.StudentName = Basic.CookieHelper.GetCookie("Student", "StudentName"); //学生姓名 userinfo.Bank = Basic.CookieHelper.GetCookie("Student", "Bank"); //当前登陆的账号 userinfo.LevelName = Basic.CookieHelper.GetCookie("Student", "LevelName"); //用户等级名称: 1普通注册用户;2高考查看卡; 3普通测试卡; 4普通卡; 5VIP测试卡; 6VIP卡;9会员卡 userinfo.ProvinceName = Basic.CookieHelper.GetCookie("Student", "ProvinceName"); //省份名称 //userinfo.StudentId = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "StudentId"), 5); //userinfo.StudentLevel = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "StudentLevel"), 4);//用户等级id:1普通注册用户;2高考查看卡; 3普通测试卡; 4普通卡; 5VIP测试卡; 6VIP卡;9会员卡 //userinfo.ProvinceId = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "ProvinceId"), 3);//省份id //userinfo.KeLei = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "KeLei"), 5);//科类 //userinfo.GKYear = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "GKYear"), 2014);//参加高考的年份 //userinfo.Status = Basic.Utils.StrToInt(Basic.CookieHelper.GetCookie("Student", "Status"), 1);//登陆之后的状态值 userinfo.ProvinceName = DAL.Common.GetProvinceName(userinfo.ProvinceId); userinfo.KeLeiMingCheng = DAL.Common.GetKeLeiMingCheng(userinfo.KeLei); #endregion #region 新疆乌鲁木齐咨询中心的卡不能在喀什地区使用 if (userinfo.ProvinceId == 72)//新疆乌鲁木齐咨询中心 { Entity.AreaJson infoAreaJson = DAL.AnalysisArea.GetAreaModel(); if (infoAreaJson != null) { if (infoAreaJson.code == "0") { if (infoAreaJson.data.city_id == "653100") { //新疆乌鲁木齐咨询中心的卡不能在喀什地区使用 Basic.MsgHelper.AlertUrlMsg("该卡不能在喀什地区使用", "/logout.aspx"); } } } } #endregion Status(); //根据状态 判定去向 //根据登陆用户的省份,去取一下省份的志愿配置信息 int ProvinceId = userinfo.ProvinceId; provinceConfig = DAL.ProvinceConfig.ProvinceConfigEntityGet(userinfo.ProvinceId); //测试数据 //history.LeiJiRenShu = 1000; //history.RenShu = 99; //history.WeiCi = 900; //history.FenShu = 600; if (userinfo.ProvinceId == 11)//浙江 { history_zhejiang = DAL.StudentGaoKaoHistory_ZheJiang.StudentGaoKaoHistory_ZheJiangEntityGetByStudentId(userinfo.StudentId); if (history_zhejiang == null) { Basic.MsgHelper.AlertUrlMsg("请首先设置自己的考试成绩!", "/Persional/ChengJiEdit2.aspx"); //跳转到成绩输入页面 } if (history_zhejiang.ZongFen1 == 0 && history_zhejiang.ZongFen2 == 0 && history_zhejiang.ZongFen3 == 0) { Basic.MsgHelper.AlertUrlMsg("您的成绩设置有问题,请重新设置后使用", "/Persional/ChengJiEdit2.aspx"); } //判断第几批次,批次线差 fenshuxian = DAL.FenShuXian.FenShuXianEntityGet(ProvinceId, " AND KeLei = " + userinfo.KeLei); // studentChengJi = DAL.CommonTuiJian.GetZheJiangUserPiCi(fenshuxian, history_zhejiang.ZongFen1, provinceConfig.LatestProvinceWeiCiYear, ProvinceId, userinfo.KeLei); //if (studentChengJi.PiCi == 0) // Basic.MsgHelper.AlertUrlMsg("您的成绩设置有问题,请重新设置后使用", "/Persional/ChengJiEdit2.aspx"); //StudentChengJiPiCi = studentChengJi.PiCi; ////studentChengJi.PiCiMingCheng = DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); //if (StudentChengJiPiCi <= 3) // StudentChengJiPiCiMingCheng = "本科" + StudentChengJiPiCiMingCheng; } else { history = DAL.StudentGaoKaoHistory.StudentGaoKaoHistoryEntityGet(userinfo.StudentId); //非浙江 if (history == null) { Basic.MsgHelper.AlertUrlMsg("请首先设置自己的考试成绩!", "/Persional/ChengJiEdit2.aspx"); //跳转到成绩输入页面 } if (history.FenShu == 0) { Basic.MsgHelper.AlertUrlMsg("您的成绩设置有问题,请重新设置后使用", "/Persional/ChengJiEdit2.aspx"); } if (history.IsSetUpWeiCi == 0) { Entity.ProvinceWeiCi infoProvinceWeiCi = null; if (userinfo.ProvinceId == 10)//江苏 { //if (history.FenShu < 180) //{ // history.FenShu = 180; //} infoProvinceWeiCi = DAL.ProvinceWeiCi.ProvinceWeiCiEntityGetByFenShu(history.FenShu, provinceConfig.LatestProvinceWeiCiYear, userinfo.ProvinceId, userinfo.KeLei); } else { infoProvinceWeiCi = DAL.ProvinceWeiCi.ProvinceWeiCiEntityGetByFenShu(history.FenShu, provinceConfig.LatestProvinceWeiCiYear, userinfo.ProvinceId, userinfo.KeLei); } if (infoProvinceWeiCi != null) { history.WeiCi = infoProvinceWeiCi.WeiCi; } else { Basic.MsgHelper.AlertUrlMsg("您设置的成绩有问题,请重新设置后使用", "/Persional/ChengJiEdit2.aspx"); } } //判断第几批次,批次线差 fenshuxian = DAL.FenShuXian.FenShuXianEntityGet(ProvinceId, " AND KeLei = " + userinfo.KeLei); if (history.IsSetUpFenShuXian == 1) { fenshuxian.PcFirst = (history.PcFirst > 0 ? history.PcFirst : fenshuxian.PcFirst); fenshuxian.PcSecond = (history.PcSecond > 0 ? history.PcSecond : fenshuxian.PcSecond); fenshuxian.PcThird = (history.PcThird > 0 ? history.PcThird : fenshuxian.PcThird); fenshuxian.ZkFirst = (history.PcZhuanKeFirst > 0 ? history.PcZhuanKeFirst : fenshuxian.ZkFirst); fenshuxian.ZkSecond = (history.PcZhuanKeSecond > 0 ? history.PcZhuanKeSecond : fenshuxian.ZkSecond); } studentChengJi = DAL.CommonTuiJian.GetUserPiCi(fenshuxian, history.FenShu, provinceConfig.LatestProvinceWeiCiYear, ProvinceId, userinfo.KeLei); if (studentChengJi.PiCi == 0) { Basic.MsgHelper.AlertUrlMsg("您的成绩设置有问题,请重新设置后使用", "/Persional/ChengJiEdit2.aspx"); } StudentChengJiPiCi = studentChengJi.PiCi; //<%=DAL.Common.GetPiCiMingCheng(studentChengJi.PiCi) %> if (history.IsSetUpFenShuXian == 1) { switch (StudentChengJiPiCi) { case 1: if (history.PcFirst > 0) { studentChengJi.PiCiMingCheng = "预估" + DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); } break; case 2: if (history.PcSecond > 0) { studentChengJi.PiCiMingCheng = "预估" + DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); } break; case 3: if (history.PcThird > 0) { studentChengJi.PiCiMingCheng = "预估" + DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); } break; case 4: if (history.PcZhuanKeFirst > 0) { studentChengJi.PiCiMingCheng = "预估" + DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); } break; case 5: if (history.PcZhuanKeSecond > 0) { studentChengJi.PiCiMingCheng = "预估" + DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); } break; default: studentChengJi.PiCiMingCheng = DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); break; } } else { studentChengJi.PiCiMingCheng = DAL.Common.GetPiCiName(StudentChengJiPiCi, userinfo.ProvinceId); } if (StudentChengJiPiCi <= 3) { StudentChengJiPiCiMingCheng = "本科" + StudentChengJiPiCiMingCheng; } } }