protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Post("EDULENTH"))) { grade = comTran.ToInt(Post("EDULENTH")); } else { grade = comTran.ToInt(sch_info.CURRENT_YEAR); } string optype = Request.QueryString["optype"]; if (!string.IsNullOrEmpty(optype)) { switch (optype.ToLower().Trim()) { case "getlist": Response.Write(GetList()); Response.End(); break; case "getcols": Response.Write(GetDataColumns()); Response.End(); break; } } }
private string CheckSave() { string result = string.Empty; string job_type = Get("job_type"); string oid = Get("id"); string strEmployer = Server.UrlDecode(Get("employer")); string strJob_Name = Server.UrlDecode(Get("job_name")); string strIsModi = string.Empty; //非临时岗需要校验是否在申报时间范围内 if (job_type != "2") { bool iscan = JobManageHandleClass.getInstance().IsCanDeclare(out result); if (result.Length > 0) { return(result); } } if (oid.Length > 0) { strIsModi = string.Format(" AND OID NOT IN ('{0}') ", oid); } string strSql = string.Format("SELECT COUNT(1) FROM QZ_JOB_MANAGE WHERE EMPLOYER = '{0}' AND JOB_NAME = '{1}'{2}", strEmployer, strJob_Name, strIsModi); object o = ds.ExecuteTxtScalar(strSql); if (o != null && comTran.ToInt(o) > 0) { return("岗位已存在"); } return(string.Empty); }
private string CheckSave() { string oid = Get("id"); string strEmployer = Server.UrlDecode(Get("employer")); string strType = Server.UrlDecode(Get("type")); string strIsModi = string.Empty; if (oid.Length > 0) { strIsModi = string.Format(" AND OID NOT IN ('{0}') ", oid); } string strSql = string.Format("SELECT COUNT(1) FROM QZ_EMPLOYER_MANAGE WHERE EMPLOYER = '{0}' AND EMPLOYER_TYPE = '{1}'{2}", strEmployer, strType, strIsModi); object o = ds.ExecuteTxtScalar(strSql); if (o != null && comTran.ToInt(o) > 0) { return("岗位已存在"); } return(string.Empty); }