protected void BindData() { HttpCookie c*k = Request.Cookies["ftcook"]; if (c*k != null) { ypzzpid = Convert.ToInt32(c*k["ypzzpid"]); } if (ypzzpid != -1) { YingpinzheZhaopin ypzzp = FTInterviewBLL.YingpinzheZhaopinManage.GetYPZZPbyId(ypzzpid); Yingpinzhe ypz = FTInterviewBLL.YingpinzheManage.GetYingpinzheById(ypzzp.YpzID); yName.Text = ypz.Name; BirthDay.Text = ypz.Birthday; yDegree.Text = ypz.XueliName; yJoinTime.Text = ypz.JoinTime; yDepart.Text = ypz.YpDepName; yPosition.Text = ypz.YpPosName; yPolitic.Text = ypz.PolName; } if (c*k != null) { KGName.Text = Server.UrlDecode(c*k["kgname"]); //c*k["kgname"]; c*k.Values.Remove("ypzzpid"); c*k.Values.Add("ypzzpid", ypzzpid + ""); c*k.Expires.AddDays(1); Response.Cookies.Add(c*k); } }
public static int UpdateSubmitState(YingpinzheZhaopin ypzzp) { String sql = "update yingpingzhezhaopin set submitstate=@submitstate where id=@id"; List <MySqlParameter> para_list = new List <MySqlParameter>(); para_list.Add(new MySqlParameter("@id", ypzzp.ID)); para_list.Add(new MySqlParameter("@submitstate", ypzzp.SubmitState)); return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray())); }
public static int Add(YingpinzheZhaopin yz) { String sql = "insert into yingpingzhezhaopin(ypzid,zpid,ranindex) values(@ypzid,@zpid,@ranindex)"; List <MySqlParameter> para_list = new List <MySqlParameter>(); para_list.Add(new MySqlParameter("@ypzid", yz.YpzID)); para_list.Add(new MySqlParameter("@zpid", yz.ZhaopinId)); para_list.Add(new MySqlParameter("@ranindex", yz.MsIndex)); return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray())); }
protected void BindData() { if (zpitmid != -1) { ZhaopinItem zim = FTInterviewBLL.ZhaopinItemManage.GetZhaopinItemById(zpitmid); title_f.Text = zim.Title + "面试成绩"; //List<YingpinzheZhaopin> ls = FTInterviewBLL.YingpinzheZhaopinManage.GetAllYingpinzheInzhaopinID(zpid); List <YingpinzheZhaopin> ls = FTInterviewBLL.YingpinzheZhaopinManage.GetAllYingpinzheInzhaopinItemID(zpitmid); DataTable dt = new DataTable("msg"); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("bm_duty", typeof(string)); dt.Columns.Add("duty", typeof(string)); dt.Columns.Add("ypdep_pos", typeof(string)); dt.Columns.Add("yppos", typeof(string)); dt.Columns.Add("score", typeof(string)); dt.Columns.Add("info", typeof(string)); for (int i = 0; i < ls.Count; i++) { DataRow dr = dt.NewRow(); YingpinzheZhaopin t_ypzzp = ls[i]; dr["Id"] = t_ypzzp.ID; dr["Name"] = t_ypzzp.YpzName; dr["bm_duty"] = t_ypzzp.YpzDepName + "-" + t_ypzzp.YpzPosName; dr["duty"] = t_ypzzp.YpzPosName; dr["ypdep_pos"] = t_ypzzp.YpzYpDepName + "-" + t_ypzzp.YpzYpPosName; dr["yppos"] = t_ypzzp.YpzYpPosName; int sc = (int)FTInterviewBLL.PingfenManage.GetScoreSums(t_ypzzp.ID); dr["score"] = sc + ""; if (sc < 60) { dr["info"] = "不及格"; } else { dr["info"] = ""; } dt.Rows.Add(dr); } MsjgGridview.DataSource = dt; MsjgGridview.DataBind(); } }
public static List <YingpinzheZhaopin> GetAllYingpinzheInzhaopinID(int zpid) { String sql = "select yingpingzhezhaopin.id as Id, " + "yingpinzhe.name as Name," + "department.departname as DepName," + "yingpinzhe.dutyname as DutyName," + " yingpingzhezhaopin.ranindex as OrderIndex " + " from yingpinzhe,yingpingzhezhaopin,department,zhaopin " + " where yingpinzhe.ypzstate=1 and yingpingzhezhaopin.ypzid=yingpinzhe.id " + " and yingpinzhe.departid=department.id and department.bmstate=1 " + " and yingpingzhezhaopin.zpid= zhaopin.id " + " and zhaopin.id in (select zhaopin.id from zhaopin,zpgw,zpfb,department,zhaopinitem " + " where zhaopin.zpfbid=zpfb.id and zpfb.fbstate=1 and zhaopin.zpstate=1 " + " and zhaopinitem.id=zpfb.zpitmid and zhaopinitem.zpitemstate=1 " + " and zpfb.zpgwid=zpgw.id and zpgw.zpbm=department.id and department.bmstate=1 ) " + "and yingpingzhezhaopin.zpid=" + zpid + " order by ranindex asc"; DataTable dt = MySqlDBHelper.GetDataSet(sql); List <YingpinzheZhaopin> list = new List <YingpinzheZhaopin>(); int index_t = 0; foreach (DataRow dr in dt.Rows) { index_t++; YingpinzheZhaopin ypzzp = new YingpinzheZhaopin(); ypzzp.ID = Convert.ToInt32(dr["Id"].ToString()); ypzzp.YpzName = dr["Name"].ToString(); ypzzp.YpzDepName = dr["DepName"].ToString(); ypzzp.YpzPosName = dr["DutyName"].ToString(); ypzzp.MsIndex = (int)dr["OrderIndex"]; // if (ypzzp.MsIndex != 32767) { ypzzp.Index_temp = ypzzp.MsIndex;// index_t; } // else { // ypzzp.Index_temp = 32767; } list.Add(ypzzp); } return(list); }
protected void Page_Load(object sender, EventArgs e) { HttpCookie c*k = Request.Cookies["ftcook"]; if (c*k != null) { if (c*k["zpid"] != null) { zpid = Convert.ToInt32(c*k["zpid"].ToString()); Zhaopin zp = FTInterviewBLL.ZhaopinManage.GetZhaopinById(zpid); ktid = zp.KaotiID; c*k.Values.Remove("ktid"); c*k.Values.Add("ktid", ktid + ""); c*k.Expires = DateTime.Now.AddDays(1); Response.AppendCookie(c*k); } else { Response.Redirect("../login.aspx"); } } else { Response.Redirect("../login.aspx"); } if (Request.QueryString["ms_id"] != null) { int ypzzpid = Convert.ToInt32(Request["ms_id"]); YingpinzheZhaopin y = FTInterviewBLL.YingpinzheZhaopinManage.GetYPZZPbyId(ypzzpid); c*k.Values.Remove("ypzzpid"); c*k.Values.Add("ypzzpid", y.ID + ""); c*k.Expires = DateTime.Now.AddDays(1); Response.AppendCookie(c*k); } if (!IsPostBack) { stls.Clear(); index = 1; BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HttpCookie c*k = Request.Cookies["ftcook"]; if (c*k["ypzzpid"] != null) { ypzzpid = Convert.ToInt32(c*k["ypzzpid"].ToString()); } if (c*k != null) { int _zpid = Convert.ToInt32(c*k["zpid"]); int _kgid = Convert.ToInt32(c*k["kgid"]); KaoguanZhaopin kgzp = FTInterviewBLL.KaoguanZhaopinManage.GetKgZPbyKgIdZpid(_kgid, _zpid); if (kgzp != null) { kgzpid = kgzp.Id; } } if (ypzzpid != -1) { YingpinzheZhaopin t = FTInterviewBLL.YingpinzheZhaopinManage.GetYPZZPbyId(ypzzpid); Zhaopin zp = FTInterviewBLL.ZhaopinManage.GetZhaopinById(t.ZhaopinId); kaotiid = zp.KaotiID; if (c*k != null) { c*k.Values.Remove("kaotiid"); c*k.Values.Add("kaotiid", kaotiid + ""); c*k.Expires = DateTime.Now.AddDays(1); Response.AppendCookie(c*k); } } flag = false; shitils.Clear(); xdls.Clear(); } BindData(); }
//hhy public static List <YingpinzheZhaopin> GetAllYingpinzheInzhaopinItemID(int zpitmid) { String sql = "select yingpingzhezhaopin.id as Id, " + "yingpingzhezhaopin.ypzid as YpzId," + "yingpinzhe.name as Name," + "department.departname as DepName," + "yingpinzhe.dutyname as DutyName," + " yingpingzhezhaopin.ranindex as OrderIndex " + " from yingpinzhe,yingpingzhezhaopin,department,zhaopin " + " where yingpinzhe.ypzstate=1 and yingpingzhezhaopin.ypzid=yingpinzhe.id " + " and yingpinzhe.departid=department.id and department.bmstate=1 " + " and yingpingzhezhaopin.zpid= zhaopin.id " + " and zhaopin.id in (select zhaopin.id from zhaopin,zpgw,zpfb,department " + " where zhaopin.zpfbid=zpfb.id and zpfb.fbstate=1 and zhaopin.zpstate=1 " + " and zpfb.zpitmid=" + zpitmid + " and zpfb.zpgwid=zpgw.id and zpgw.zpbm=department.id and department.bmstate=1 ) " + " order by ranindex asc"; DataTable dt = MySqlDBHelper.GetDataSet(sql); List <YingpinzheZhaopin> list = new List <YingpinzheZhaopin>(); foreach (DataRow dr in dt.Rows) { YingpinzheZhaopin ypzzp = new YingpinzheZhaopin(); ypzzp.ID = Convert.ToInt32(dr["Id"].ToString()); ypzzp.YpzName = dr["Name"].ToString(); ypzzp.YpzDepName = dr["DepName"].ToString(); ypzzp.YpzPosName = dr["DutyName"].ToString(); int id_ypz = Convert.ToInt32(dr["YpzId"].ToString()); Yingpinzhe ypz_t = YingpinzheService.GetYingpinzheById(id_ypz); ypzzp.YpzYpDepName = ypz_t.YpDepName; ypzzp.YpzYpPosName = ypz_t.YpPosName; ypzzp.MsIndex = dr["OrderIndex"].ToString() == "" ? 0 : Convert.ToInt32(dr["OrderIndex"].ToString()); list.Add(ypzzp); } return(list); }
protected void BindData() { HttpCookie c*k = Request.Cookies["ftcook"]; if (c*k != null) { ypzzpid = Convert.ToInt32(c*k["ypzzpid"]); } if (ypzzpid != -1) { Dictionary <int, int> temp = new Dictionary <int, int>(); YingpinzheZhaopin yz = FTInterviewBLL.YingpinzheZhaopinManage.GetYPZZPbyId(ypzzpid); Yingpinzhe mypz = FTInterviewBLL.YingpinzheManage.GetYingpinzheById(yz.YpzID); YpzName.Text = mypz.Name; DataTable dt = FTInterviewBLL.YingpinzheZhaopinManage.GetAllYPZZPInzpId(yz.ZhaopinId); foreach (DataRow dr in dt.Rows) { int my_id = Convert.ToInt32(dr["msIndex"].ToString()); if (!temp.ContainsKey(my_id)) { temp.Add(my_id, 1); } } string res = ""; for (int i = 1; i <= dt.Rows.Count; i++) { if (!temp.ContainsKey(i)) { res += i + ","; } } if (res.Length > 1) { res = res.Substring(0, res.Length - 1); } HiddenField1.Value = res; } }
//add result protected void AddYpz_Click(object sender, EventArgs e) { if (zpid != -1) { string[] res = hdfWPBH.Value.Split(','); for (int i = 0; i < res.Length - 1; i++) { int id = Convert.ToInt32(res[i]); YingpinzheZhaopin yzp = new YingpinzheZhaopin(); yzp.YpzID = id; yzp.ZhaopinId = zpid; yzp.MsIndex = 32767; yzp.SubmitState = 1; FTInterviewBLL.YingpinzheZhaopinManage.Add(yzp); } BindData(); } }
private void BindData() { HttpCookie c*k = Request.Cookies["ftcook"]; if (c*k != null && c*k["ypzzpid"] != null) { ypzzpid = Convert.ToInt32(c*k["ypzzpid"].ToString()); } if (ypzzpid != -1) { YingpinzheZhaopin ypzzp = FTInterviewBLL.YingpinzheZhaopinManage.GetYPZZPbyId(ypzzpid); YpzName.Text = ypzzp.YpzName; double sc = FTInterviewBLL.PingfenManage.GetScoreSums(ypzzp.ID); ResultScore.Text = Convert.ToString(sc); } else { Response.Redirect("../login.aspx"); } }
public static YingpinzheZhaopin GetYPZZPbyId(int id) { String sql = "select yingpingzhezhaopin.id as Id, " + "ypzid," + "zpid," + "ranindex, " + "submitstate," + " yingpinzhe.name as Name," + " department.departname as DepName," + " yingpinzhe.dutyname as DutyName " + " from yingpingzhezhaopin,yingpinzhe,department,zhaopin " + " where yingpingzhezhaopin.ypzid=yingpinzhe.id " + " and yingpingzhezhaopin.zpid= zhaopin.id " + " and zhaopin.id in (select zhaopin.id from zhaopin,zpfb,zpgw,department " + " where zhaopin.zpfbid=zpfb.id and zpfb.fbstate=1 and zhaopin.zpstate=1 " + " and zpfb.zpgwid=zpgw.id and zpgw.zpbm=department.id and department.bmstate=1 ) " + " and department.id = yingpinzhe.departid and department.bmstate =1 " + "and yingpinzhe.ypzstate=1 and yingpingzhezhaopin.id=" + id; DataTable dt = MySqlDBHelper.GetDataSet(sql); YingpinzheZhaopin ypzzp = new YingpinzheZhaopin(); foreach (DataRow dr in dt.Rows) { ypzzp.ID = (int)dr["Id"]; ypzzp.YpzID = Convert.ToInt32(dr["ypzid"].ToString()); ypzzp.ZhaopinId = Convert.ToInt32(dr["zpid"].ToString()); ypzzp.MsIndex = Convert.ToInt32(dr["ranindex"].ToString()); ypzzp.SubmitState = Convert.ToInt32(dr["submitstate"].ToString()); ypzzp.YpzName = dr["Name"].ToString(); ypzzp.YpzDepName = dr["DepName"].ToString(); ypzzp.YpzPosName = dr["DutyName"].ToString(); return(ypzzp); } return(null); }
private void BindData(int ypzid = -1, int zpid = -1) { YingpinzheZhaopin ypzzp = FTInterviewBLL.YingpinzheZhaopinManage.GetYPZZPbyId(ypzzpid); Yingpinzhe ypz = FTInterviewBLL.YingpinzheManage.GetYingpinzheById(ypzzp.YpzID); Zhaopin zp = FTInterviewBLL.ZhaopinManage.GetZhaopinById(ypzzp.ZhaopinId); yName.Text = ypz.Name; BirthDay.Text = ypz.Birthday; yDegree.Text = ypz.XueliName; yJoinTime.Text = ypz.JoinTime; yDepart.Text = ypz.YpDepName; yPosition.Text = ypz.YpPosName; yPolitic.Text = ypz.XueliName; double sum = 0; List <KaoguanZhaopin> kgls = FTInterviewBLL.KaoguanZhaopinManage.GetKgZPbyzpId(ypzzp.ZhaopinId); int kgnum = kgls.Count; if (kgnum < 1) { return; } DataTable dt = new DataTable("Result"); dt.Columns.Add("title", typeof(string)); for (int i = 1; i <= kgnum; i++) { dt.Columns.Add("kg" + i, typeof(string)); } DataRow dr = dt.NewRow(); dr["title"] = ""; for (int i = 1; i <= kgnum; i++) { dr["kg" + i] = kgls[i - 1].KgName; } dt.Rows.Add(dr); dr = dt.NewRow(); dr["title"] = "权重"; for (int i = 1; i <= kgnum; i++) { dr["kg" + i] = "" + (Convert.ToDouble(kgls[i - 1].Weight) * 0.01); } dt.Rows.Add(dr); dr = dt.NewRow(); dr["title"] = "实际得分"; for (int i = 1; i <= kgnum; i++) { double sco = FTInterviewBLL.PingfenManage.GetScoreSums(ypzzpid, kgls[i - 1].Id); dr["kg" + i] = "" + sco; sum += kgls[i - 1].Weight * (double)sco * 0.01; } dt.Rows.Add(dr); dr = dt.NewRow(); dr["title"] = "面试得分"; dr["kg1"] = sum + "";//Convert.ToInt32(sum)+""; dt.Rows.Add(dr); ScoreDetailAll.DataSource = dt; ScoreDetailAll.DataBind(); ScoreDetailAll.Rows[3].Cells[1].ColumnSpan = kgnum; for (int i = 2; i <= kgnum; i++) { ScoreDetailAll.Rows[3].Cells[i].Visible = false; } List <Shiti> stls = FTInterviewBLL.ShitiManage.GetAllShitiByKaotiId(zp.KaotiID); int tinum = stls.Count; //if(tinum>0) { DataTable dt1 = new DataTable("details"); dt1.Columns.Add("title", typeof(string)); for (int i = 1; i <= tinum; i++) { dt1.Columns.Add("ti" + i, typeof(string)); } DataRow dr1 = dt1.NewRow(); dr1["title"] = ""; for (int i = 1; i <= tinum; i++) { dr1["ti" + i] = "试题" + i; } dt1.Rows.Add(dr1); for (int i = 0; i < kgls.Count; i++) { dr1 = dt1.NewRow(); dr1["title"] = kgls[i].KgName; dt1.Rows.Add(dr1); dr1 = dt1.NewRow(); dr1["title"] = "权重"; for (int j = 1; j <= tinum; j++) { dr1["ti" + j] = stls[j - 1].Weight * 0.01; } dt1.Rows.Add(dr1); List <double> realvalue = new List <double>(); double sum_t = 0; dr1 = dt1.NewRow(); dr1["title"] = "实际得分"; for (int j = 0; j < tinum; j++) { int val = FTInterviewBLL.PingfenManage.GetScoreSumSingleTi(ypzzpid, kgls[i].Id, stls[j].Id); double val_new = val * 0.01 * stls[j].Weight; realvalue.Add(val_new); sum_t += val_new; dr1["ti" + (j + 1)] = val; } dt1.Rows.Add(dr1); dr1 = dt1.NewRow(); dr1["title"] = "权重得分"; for (int j = 0; j < tinum; j++) { dr1["ti" + (j + 1)] = realvalue[j]; } dt1.Rows.Add(dr1); dr1 = dt1.NewRow(); dr1["title"] = "总分"; if (tinum > 0) { dr1["ti1"] = sum_t + ""; } dt1.Rows.Add(dr1); } ScoreDetailEach.DataSource = dt1; ScoreDetailEach.DataBind(); for (int k = 0; k < kgnum; k++) { int myid = 1 + 5 * k; ScoreDetailEach.Rows[myid].Cells[0].ColumnSpan = tinum + 1; ScoreDetailEach.Rows[myid].Cells[0].ForeColor = System.Drawing.Color.Red; if (tinum > 0) { ScoreDetailEach.Rows[myid + 4].Cells[1].ColumnSpan = tinum; } for (int n = 1; n <= tinum; n++) { ScoreDetailEach.Rows[myid].Cells[n].Visible = false; } for (int n = 2; n <= tinum; n++) { ScoreDetailEach.Rows[myid + 4].Cells[n].Visible = false; } } } }
protected void BindData() { DataProcess.DepartmentBind(department); if (zpid != -1) { Zhaopin zp = FTInterviewBLL.ZhaopinManage.GetZhaopinById(zpid); ZhaopinFb zpfb = FTInterviewBLL.ZhaopinFbManage.GetZhaopinFbByid(zp.ZpfbId); department.SelectedValue = zpfb.FbBmId.ToString(); department.Enabled = false; DataProcess.PositionBind(Position, zpfb.FbBmId); Position.SelectedValue = zpfb.ZpPosName; Position.Enabled = false; MsTime.Value = zp.InterviewTime; MsTime.Disabled = true; DateTime ddt = Convert.ToDateTime(zp.InterviewTime); title_f.Text = ddt.Year + "年北京铁路局丰台机务段公开招聘面试成绩"; List <YingpinzheZhaopin> ls = FTInterviewBLL.YingpinzheZhaopinManage.GetAllYingpinzheInzhaopinID(zpid); DataTable dt = new DataTable("msg"); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("bm_duty", typeof(string)); dt.Columns.Add("duty", typeof(string)); dt.Columns.Add("ypdep_pos", typeof(string)); dt.Columns.Add("yppos", typeof(string)); dt.Columns.Add("score", typeof(string)); dt.Columns.Add("info", typeof(string)); for (int i = 0; i < ls.Count; i++) { DataRow dr = dt.NewRow(); YingpinzheZhaopin t_ypzzp = ls[i]; dr["Id"] = t_ypzzp.ID; dr["Name"] = t_ypzzp.YpzName; dr["bm_duty"] = t_ypzzp.YpzDepName + "-" + t_ypzzp.YpzPosName; dr["duty"] = t_ypzzp.YpzPosName; dr["ypdep_pos"] = zp.ZpbmName + "-" + zp.ZpgwName; dr["yppos"] = zp.ZpgwName; double sc = FTInterviewBLL.PingfenManage.GetScoreSums(t_ypzzp.ID); dr["score"] = Convert.ToString(sc); if (sc < zp.HegeLine) { dr["info"] = "不及格"; } else { dr["info"] = ""; } dt.Rows.Add(dr); } MsjgGridview.DataSource = dt; MsjgGridview.DataBind(); } }
public static int UpdateSubmitState(YingpinzheZhaopin ypzzp) { return(FTInterviewDAL.YingpinzheZhaopinService.UpdateSubmitState(ypzzp)); }
public static int Add(YingpinzheZhaopin yz) { return(FTInterviewDAL.YingpinzheZhaopinService.Add(yz)); }