public static string OperateRecords(string ids, int op) { string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); using (BLLJobType bll = new BLLJobType()) { foreach (string id in array) { switch (op) { case 7: SearchJobDetail cond = new SearchJobDetail(); cond.CpJobTypeID = Convert.ToInt32(id); using (BLLJobDetail jobbll = new BLLJobDetail()) { if (jobbll.GetList(cond).Count > 0) { return("有子类目不能删除;"); } else { bll.Delete(id); break; } } } } if (bll.IsFail) { return(ExceptionManager.GetErrorMsg(bll.DevNetException)); } } return(string.Empty); }
private void bindList() { SearchJobType con = new SearchJobType(); con.CpJobTypeName = txtCpJobTypeName.Text.Trim().ToString(); if (rbtnIsChinese.Checked == true) { con.IsEnglish = 1; } else if (rbtnIsEnglish.Checked == true) { con.IsEnglish = 2; } Pagination pagina = new Pagination(pager.PageIndex, pager.PageSize, 0); using (BLLJobType bll = new BLLJobType()) { List <JobType> lists = bll.GetPageList(con, pagina, CompanyInformationType.ID_FieldName, ScriptQuery.SortEnum.DESC); pager.RecordCount = pagina.RecordCount; pager.PageCount = pagina.PageCount; grid_friendlink.DataSource = lists; grid_friendlink.DataBind(); } }
private void getProtypeList() { SearchJobType search = new SearchJobType(); using (BLLJobType bll = new BLLJobType()) { DataTable dt = bll.GetTable(search); if (dt != null) { ddlJobTypeID.DataSource = dt; ddlJobTypeID.DataTextField = JobType.JobTypeName_FieldName; ddlJobTypeID.DataValueField = JobType.ID_FieldName; ddlJobTypeID.DataBind(); } } }
/// <summary> /// 获取职位类别名称 /// </summary> protected string GetJobTypeName(int proinfotype) { using (BLLJobType bll = new BLLJobType()) { JobType obj = new JobType(); if (proinfotype > 0) { obj = bll.GetSingle(proinfotype); if (obj != null) { return(obj.JobTypeName.ToString()); } } return(""); } }
private void getProtypeList() { SearchJobType search = new SearchJobType(); using (BLLJobType bll = new BLLJobType()) { DataTable dt = bll.GetTable(search); if (dt != null) { ddlJobType.DataSource = dt; ddlJobType.DataTextField = JobType.JobTypeName_FieldName; ddlJobType.DataValueField = JobType.ID_FieldName; ddlJobType.DataBind(); ddlJobType.Items.Insert(0, new ListItem("==请选择类型==", "0")); } } }
protected void btnSubmit_Click(object sender, EventArgs e) { using (BLLJobType bll = new BLLJobType()) { JobType obj = new JobType(); if (id > 0) { obj = bll.GetSingle(id); obj.ID = id; } obj.JobTypeName = txtJobTypeName.Text.Trim().ToString(); obj.Remarks = txtRemarks.Text.ToString(); if (rbtnIsChinese.Checked == true) { obj.IsEnglish = 1; } else if (rbtnIsEnglish.Checked == true) { obj.IsEnglish = 2; } else { ShowMsg("请选择语言类别!"); return; } bll.Save(obj); if (bll.IsFail) { ExceptionManager.ShowErrorMsg(this, bll.DevNetException); } else { JSMsg.ShowWinRedirect(this, "保存成功", "cpJobTypeList.aspx"); } } }
private void setInfo() { if (id > 0) { using (BLLJobType bll = new BLLJobType()) { JobType cpinfor = bll.GetSingle(id); if (cpinfor != null) { if (cpinfor.IsEnglish == 1) { rbtnIsChinese.Checked = true; } else if (cpinfor.IsEnglish == 2) { rbtnIsEnglish.Checked = true; } txtJobTypeName.Text = cpinfor.JobTypeName; txtRemarks.Text = cpinfor.Remarks; } } } }