/// <summary> /// 根据招聘计划ID,获取招聘计划信息,并设置到页面显示 /// </summary> /// <param name="planID">招聘计划ID</param> private void InitRectPlanInfo(string planID) { //设置申请计划编号可见 divRectPalnNo.Attributes.Add("style", "display:block;"); //自动生成编号的控件设置为不可见 divCodeRule.Attributes.Add("style", "display:none;"); //查询招聘计划信息 DataSet dsPlanInfos = RectPlanBus.GetRectPlanInfoWithID(planID); //获取招聘计划基本信息 DataTable dtBaseInfo = dsPlanInfos.Tables[0]; //基本信息存在时 if (dtBaseInfo != null && dtBaseInfo.Rows.Count > 0) { //设置申请计划编号 divRectPalnNo.Value = dtBaseInfo.Rows[0]["PlanNo"] == null ? "" : dtBaseInfo.Rows[0]["PlanNo"].ToString(); //主题 txtTitle.Text = dtBaseInfo.Rows[0]["Title"] == null ? "" : dtBaseInfo.Rows[0]["Title"].ToString(); //开始时间 txtStartDate.Text = dtBaseInfo.Rows[0]["StartDate"] == null ? "" : dtBaseInfo.Rows[0]["StartDate"].ToString(); this.txtEndDate.Text = dtBaseInfo.Rows[0]["EndDate"] == null ? "" : dtBaseInfo.Rows[0]["EndDate"].ToString(); this.ddlStatus.Value = dtBaseInfo.Rows[0]["Status"] == null ? "" : dtBaseInfo.Rows[0]["Status"].ToString(); //负责人 UserPrincipalName.Text = dtBaseInfo.Rows[0]["PrincipalName"] == null ? "" : dtBaseInfo.Rows[0]["PrincipalName"].ToString(); txtPrincipal.Value = dtBaseInfo.Rows[0]["Principal"] == null ? "" : dtBaseInfo.Rows[0]["Principal"].ToString(); txtPlanFee.Value = dtBaseInfo.Rows[0]["PlanFee"] == null ? "" : dtBaseInfo.Rows[0]["PlanFee"].ToString(); this.txtFeeNote.Text = dtBaseInfo.Rows[0]["FeeNote"] == null ? "" : dtBaseInfo.Rows[0]["FeeNote"].ToString(); this.txtJoinMan.Value = dtBaseInfo.Rows[0]["JoinMan"] == null ? "" : dtBaseInfo.Rows[0]["JoinMan"].ToString(); this.UserJoinMan.Text = dtBaseInfo.Rows[0]["JoinMan"] == null ? "" : dtBaseInfo.Rows[0]["JoinMan"].ToString(); this.txtJoinNote.Text = dtBaseInfo.Rows[0]["JoinNote"] == null ? "" : dtBaseInfo.Rows[0]["JoinNote"].ToString(); this.txtRequireNum.Value = dtBaseInfo.Rows[0]["RequireNum"] == null ? "" : dtBaseInfo.Rows[0]["RequireNum"].ToString(); } //设置招聘目标 InitGoalInfo(dsPlanInfos.Tables[1]); //设置信息发布 InitPublishInfo(dsPlanInfos.Tables[2]); }
protected void btnImport_Click(object sender, ImageClickEventArgs e) { //从请求中获取排序列 string orderString = hidOrderBy.Value.Trim(); //排序:默认为升序 string orderBy = "asc"; //要排序的字段,如果为空,默认为"RectApplyNo" string orderByCol = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "RectApplyNo"; //降序时如果设置为降序 if (orderString.EndsWith("_d")) { //排序:降序 orderBy = "desc"; } //从请求中获取当前页 //int pageIndex = Convert.ToInt32(txtToPage.Value); ////从请求中获取每页显示记录数 //int pageCount = Convert.ToInt32(txtShowPageCount.Value); ////跳过记录数 //int skipRecord = (pageIndex - 1) * pageCount; RectPlanSearchModel searchModel = new RectPlanSearchModel(); //设置查询条件 //活动编号 searchModel.RectPlanNo = txtRectPlanNo.Value.Trim(); //主题 searchModel.Title = txtTitle.Value.Trim(); //开始时间 searchModel.StartDate = txtStartDate.Text.Trim(); searchModel.StartToDate = txtStartToDate.Text.Trim(); //负责人 string selectPrincipal = txtPrincipalID.Value; searchModel.PrincipalID = selectPrincipal; //招聘人数 searchModel.PersonCount = txtPersonCount.Value.Trim(); //活动状态 searchModel.StatusID = Request.Form["ddlStatus"].ToString(); string ord = orderByCol + " " + orderBy; int TotalCount = 0; //查询数据 DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(txtToPage.Value)) { dt = RectPlanBus.SearchSpecialExport(searchModel, 1, 10000, ord, ref TotalCount);//查询数据 } string[,] ht = { { "招聘计划编号", "RectPlanNo " }, { "主题", "Title" }, { "开始时间", "StartDate" }, { "结束时间", "EndDate" }, { "负责人", "PrincipalName" }, { "招聘人数", "PersonCount" }, { "已面试", "ReviewStatus" }, { "已录用", "EmployStatus" }, { "计划状态", "StatusName" } }; ExportExcel(dt, ht, "", "招聘计划列表"); }