public static int Add(ZhaopinFb zpfb) { String sqlstr = "insert into zpfb(zpgwid,sums,fbtime,fbstate,zpitmid) values(@zpgwid,@sums,@fbtime,@fbstate,@zpitmid)"; List <MySqlParameter> para_list = new List <MySqlParameter>(); para_list.Add(new MySqlParameter("@zpgwid", zpfb.ZpGwID)); para_list.Add(new MySqlParameter("@sums", zpfb.ZpSums)); para_list.Add(new MySqlParameter("@fbtime", zpfb.ZpFbTime)); para_list.Add(new MySqlParameter("@fbstate", zpfb.FbState)); para_list.Add(new MySqlParameter("@zpitmid", zpfb.ZpitmId)); return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray())); }
protected void BindData(int _id = -1) { DataProcess.DepartmentBind(department); List <KaoguanZhaopin> ls = new List <KaoguanZhaopin>(); List <Yingpinzhe> ypzls = new List <Yingpinzhe>(); int zpfbid = -1; if (id != -1) { Zhaopin zp = FTInterviewBLL.ZhaopinManage.GetZhaopinById(id); ZhaopinFb zf = FTInterviewBLL.ZhaopinFbManage.GetZhaopinFbByid(zp.ZpfbId); zpfbid = zp.ZpfbId; MsName.Value = zp.Title; MsTime.Value = zp.InterviewTime; HegeScore.Value = zp.HegeLine + ""; /////////////////////msg ls = FTInterviewBLL.KaoguanZhaopinManage.GetKgZPbyzpId(id); MsgGridview.DataSource = ls; MsgGridview.DataBind(); /////////////////////ypz ypzls = FTInterviewBLL.YingpinzheZhaopinManage.GetAllYingpinzheInzhaopin(id); YpzGridview.DataSource = ypzls; YpzGridview.DataBind(); } else { Step2Part.Visible = false; } MsgGridview.DataSource = ls; MsgGridview.DataBind(); YpzGridview.DataSource = ypzls; YpzGridview.DataBind(); if (zpfbid != -1) { ZhaopinFb zf = FTInterviewBLL.ZhaopinFbManage.GetZhaopinFbByid(zpfbid); department.SelectedValue = zf.FbBmId + ""; DataProcess.PositionBind(Position, zf.FbBmId); Position.SelectedValue = zf.ZpPosName; } department.Enabled = false; Position.Enabled = false; }
protected void BindData() { DataProcess.DepartmentBind(department); if (zpfbid != -1) { ZhaopinFb zf = FTInterviewBLL.ZhaopinFbManage.GetZhaopinFbByid(zpfbid); if (zf != null) { zpitmid = zf.ZpitmId; department.SelectedValue = zf.FbBmId + ""; ZpgwName.Value = zf.ZpPosName; ZpSum.Value = Convert.ToString(zf.ZpSums); } } }
public static List <ZhaopinFb> GetAllZhaopinFbList(int dep = -1, string pos = "") { DataTable dt = GetAllZhaopinFb(dep, pos); List <ZhaopinFb> ls = new List <ZhaopinFb>(); foreach (DataRow dr in dt.Rows) { ZhaopinFb zf = new ZhaopinFb(); zf.Id = Convert.ToInt32(dr["Id"].ToString()); zf.ZpGwID = Convert.ToInt32(dr["ZpgwId"].ToString()); zf.ZpSums = Convert.ToInt32(dr["ZpSums"].ToString()); zf.ZpFbTime = dr["FbTime"].ToString(); zf.ZpitmId = Convert.ToInt32(dr["ZpItmId"].ToString()); zf.ZpBmName = dr["ZpBm"].ToString(); zf.ZpPosName = dr["Zppos"].ToString(); ls.Add(zf); } return(ls); }
//hhy public static List <ZhaopinFb> GetAllZhaopinItem(int zpitmid = -1) { string sqlstr = "select zpfb.id as Id," + "zpfb.zpgwid as ZpgwId," + "zpgw.zpbm as ZpBmID," + "department.departname as ZpBm," + "zpgw.zppos as Zppos," + "zpfb.sums as ZpSums," + "zpfb.fbtime as FbTime, " + "zpfb.zpitmid as ZpItmId " + "from zpfb,zpgw,department " + " where zpfb.fbstate=1 and zpfb.zpgwid=zpgw.id" + " and zpgw.zpbm=department.id and department.bmstate=1 "; if (zpitmid != -1) { sqlstr += " and zpfb.zpitmid=" + zpitmid; } sqlstr += " order by department.id asc"; DataTable dt = MySqlDBHelper.GetDataSet(sqlstr); List <ZhaopinFb> ls = new List <ZhaopinFb>(); foreach (DataRow dr in dt.Rows) { ZhaopinFb zf = new ZhaopinFb(); zf.Id = Convert.ToInt32(dr["Id"].ToString()); zf.ZpGwID = Convert.ToInt32(dr["ZpgwId"].ToString()); zf.ZpSums = Convert.ToInt32(dr["ZpSums"].ToString()); zf.ZpFbTime = dr["FbTime"].ToString(); zf.ZpitmId = Convert.ToInt32(dr["ZpItmId"].ToString()); zf.ZpBmName = dr["ZpBm"].ToString() + "--" + dr["Zppos"].ToString(); zf.ZpPosName = dr["Zppos"].ToString(); ls.Add(zf); } return(ls); }
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 Update(ZhaopinFb zbfb) { return(FTInterviewDAL.ZhaopinFbService.Update(zbfb)); }
public static int Add(ZhaopinFb zpfb) { return(FTInterviewDAL.ZhaopinFbService.Add(zpfb)); }
protected void BindData() { HttpCookie c*k = Request.Cookies["ftcook"]; if (c*k != null) { zpid = Convert.ToInt32(c*k["zpid"]); kgzpid = Convert.ToInt32(c*k["kgzpid"]); } if (zpid != -1 && kgzpid != -1) { try { Zhaopin zp = FTInterviewBLL.ZhaopinManage.GetZhaopinById(zpid); MsTitle.Text = zp.Title; ZhaopinFb fb = FTInterviewBLL.ZhaopinFbManage.GetZhaopinFbByid(zp.ZpfbId); DataProcess.DepartmentBind(department, fb.FbBmId); department.Enabled = false; DataProcess.PositionBind(Position, fb.FbBmId); Position.SelectedValue = fb.ZpPosName; Position.Enabled = false; ZpSum.Value = fb.ZpSums + ""; PubTime.Value = zp.InterviewTime; ZpSum.Disabled = true; PubTime.Disabled = true; DataTable dt = FTInterviewBLL.YingpinzheZhaopinManage.GetAllYPZZPInzpId(zpid); dt.Columns.Add("Score", typeof(string)); dt.Columns.Add("State", typeof(string)); foreach (DataRow dr in dt.Rows) { dr["SubState"] = FTInterviewBLL.YpzZhaopinkgzpManage.GetByypzidkgid( Convert.ToInt32(dr["Id"].ToString()), kgzpid).KgYpzSubmitState + ""; if (dr["SubState"].ToString() == "1") { dr["State"] = "已提交"; } else if (dr["SubState"].ToString() == "0") { dr["State"] = "未提交"; } dr["Score"] = FTInterviewBLL.PingfenManage.GetScoreSums(Convert.ToInt32(dr["Id"].ToString()), kgzpid); } /* * DataTable dtCopy = dt.Copy(); * DataView dv = dt.DefaultView; * dv.Sort = "Score desc"; * dtCopy = dv.ToTable(); */ MszGridview.DataSource = dt; AspNetPagerAskAnswer.RecordCount = dt.Rows.Count; MszGridview.DataBind(); } catch (System.Exception ex) { } } }
//save protected void Add_btnClick(object sender, EventArgs e) { if (zpfbid == -1)//add new { int tid = Convert.ToInt32(department.SelectedValue.ToString()); if (tid == -1) { Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"); Response.Write("<script language=javascript>alert('请选择部门!')</script>"); } else { int bmid = tid;//Convert.ToInt32(department.SelectedValue); string zpgw = ZpgwName.Value; int num = Convert.ToInt32(ZpSum.Value); int zpgwid = FTInterviewBLL.ZhaopinGwManage.GetZhaopinGwID(tid, zpgw); if (zpgwid == -1) { ZhaopinGw zg = new ZhaopinGw(); zg.ZpDepart = tid; zg.ZpPosition = zpgw; FTInterviewBLL.ZhaopinGwManage.Add(zg); zpgwid = FTInterviewBLL.ZhaopinGwManage.GetZhaopinGwID(tid, zpgw); } if (zpgwid != -1) { ZhaopinFb zf = new ZhaopinFb(); zf.ZpGwID = zpgwid; zf.ZpSums = num; zf.ZpFbTime = DateTime.Now.ToString(); zf.FbState = 1; zf.ZpitmId = zpitmid; FTInterviewBLL.ZhaopinFbManage.Add(zf); Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"); Response.Write("<script language=javascript>alert('添加成功!')</script>"); } else { Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"); Response.Write("<script language=javascript>alert('添加失败!')</script>"); } } } else { int tid = Convert.ToInt32(department.SelectedValue.ToString()); if (tid == -1) { Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"); Response.Write("<script language=javascript>alert('请选择部门!')</script>"); } else { string zpgw = ZpgwName.Value; int num = Convert.ToInt32(ZpSum.Value); int zpgwid = FTInterviewBLL.ZhaopinGwManage.GetZhaopinGwID(tid, zpgw); if (zpgwid == -1) { ZhaopinGw zg = new ZhaopinGw(); zg.ZpDepart = tid; zg.ZpPosition = zpgw; FTInterviewBLL.ZhaopinGwManage.Add(zg); zpgwid = FTInterviewBLL.ZhaopinGwManage.GetZhaopinGwID(tid, zpgw); } if (zpgwid != -1) { ZhaopinFb zf = new ZhaopinFb(); zf.Id = zpfbid; zf.ZpGwID = zpgwid; zf.ZpSums = num; zf.ZpFbTime = DateTime.Now.ToString(); zf.FbState = 1; zf.ZpitmId = zpitmid; FTInterviewBLL.ZhaopinFbManage.Update(zf); Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"); Response.Write("<script language=javascript>alert('更新成功!')</script>"); } else { Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"); Response.Write("<script language=javascript>alert('更新失败!')</script>"); } } } }