public ActionResult register() { string f = Request["f"]; string z = Request["z"]; List <config_major_kind> list = new List <config_major_kind>(); if (f == null) { ViewData["zwf"] = cmks.Select(); } else { config_major_kind cmk = new config_major_kind(); cmk.major_kind_name = f; list.Add(cmk); ViewData["zwf"] = list; } List <config_major> lm = new List <config_major>(); if (z == null) { ViewData["zw"] = cms.Select(); } else { config_major cmk = new config_major(); cmk.major_name = z; lm.Add(cmk); ViewData["zw"] = lm; } ViewData.Model = cpcs.Select(); return(View()); }
//删除 public async Task <int> Delete(int id) { config_major cm = await tescDbContext.cfm.FindAsync(id); tescDbContext.cfm.Remove(cm); return(await tescDbContext.SaveChangesAsync()); }
public ActionResult index(human_file hf) { config_file_first_kind s = ifkb.selectWhere(e => e.first_kind_id == hf.first_kind_id).FirstOrDefault(); config_file_second_kind s1 = iskb.SelectWhere(e => e.second_kind_id == hf.second_kind_id).FirstOrDefault(); config_file_third_kind s2 = itkb.SelectWhere(e => e.third_kind_id == hf.third_kind_id).FirstOrDefault(); config_major s3 = imb.SelectWhere(e => e.major_id == hf.human_major_id).FirstOrDefault(); config_major_kind s4 = imkb.SelectWhere(e => e.major_kind_id == hf.human_major_kind_id).FirstOrDefault(); salary_standard ssd = issdb.SelectWhere(e => e.standard_id == hf.salary_standard_id).FirstOrDefault(); hf.salary_standard_name = ssd.standard_name; hf.first_kind_name = s.first_kind_name; hf.second_kind_name = s1.second_kind_name; hf.third_kind_name = s2.third_kind_name; hf.hunma_major_name = s3.major_name; hf.human_major_kind_name = s4.major_kind_name; hf.check_status = 0; hf.salary_sum = ssd.salary_sum; hf.demand_salaray_sum = ssd.salary_sum; hf.paid_salary_sum = ssd.salary_sum; hf.file_chang_amount = 0; hf.lastly_change_time = DateTime.Now; if (ihdb.Update(hf) > 0) { return(Content("<script>location.href='/Human_file/Top_file/" + hf.huf_id + "'</script>")); } else { return(Content("<script>alert('登记失败');location.href='/Human_file/index'</script>")); } }
public JsonResult major_delete(short id) { config_major cm = new config_major() { mak_id = id }; return(Json(cms.Del(cm))); }
public Task <int> CMDel(config_major cm) { Econfig_major fm = new Econfig_major() { mak_id = cm.mak_id }; return(Del(fm)); }
/// <summary> /// 查询职位名称 /// </summary> /// <returns>异步二级机构</returns> public ActionResult majorIdVue() { config_major major = new config_major() { major_kind_id = Request["fatherId"] }; List <config_major> list = major_bll.GetMajor(major); return(Content(JsonConvert.SerializeObject(list))); }
public ActionResult major_add(config_major t) { if (Mb.Add(t) > 0) { return(Content("<script>alert('添加成功');window.location.href='/client/major'</script>")); } else { return(Content("<script>alert('添加失败');window.location.href='/client/major_add'</script>")); } }
public ActionResult major_add(config_major ma) { int num = mabll.config_majorInsert(ma); if (num > 0) { return(Content("<script>alert('新增成功!!!');location.href='/client/major'</script>")); } else { return(View(num)); } }
public Task <int> CMAdd(config_major cm) { Econfig_major fm = new Econfig_major() { major_id = cm.major_id, major_kind_id = cm.major_kind_id, major_kind_name = cm.major_kind_name, major_name = cm.major_name, mak_id = cm.mak_id, test_amount = cm.test_amount }; return(Add(fm)); }
//添加 public async Task <int> Add(config_majorModel1 cmm) { config_major cm = new config_major() { major_id = cmm.major_id, major_kind_id = cmm.major_kind_id, major_kind_name = cmm.major_kind_name, major_name = cmm.major_name, mak_id = cmm.mak_id, test_amount = cmm.test_amount }; tescDbContext.cfm.Add(cm); return(await tescDbContext.SaveChangesAsync()); }
//删除 public async Task <ActionResult> Delete(int id) { config_major cc = new config_major() { mak_id = id }; int result = await ifm.CMDel(cc); if (result > 0) { return(Content("<script>alert('删除成功');window.location.href='/config_major/Index'</script>")); } else { return(Content("<script>alert('删除失败');window.location.href='/config_major/Index'</script>")); } }
public async Task <ActionResult> Create(config_major ck) { try { int result = await ifm.CMAdd(ck); if (result > 0) { return(RedirectToAction("Index")); } else { return(View(ck)); } } catch (Exception) { return(View(ck)); } }
public async Task <List <config_major> > CMSelect() { List <Econfig_major> fm = await GetAll(); List <config_major> fm2 = new List <config_major>(); foreach (var cm in fm) { config_major mm = new config_major() { major_id = cm.major_id, major_kind_id = cm.major_kind_id, major_kind_name = cm.major_kind_name, major_name = cm.major_name, mak_id = cm.mak_id, test_amount = cm.test_amount }; fm2.Add(mm); } return(fm2); }
public ActionResult Carate(engage_major_release en) { config_file_first_kind s = ifkb.selectWhere(e => e.first_kind_id == en.first_kind_id).FirstOrDefault(); config_file_second_kind s1 = iskb.SelectWhere(e => e.second_kind_id == en.second_kind_id).FirstOrDefault(); config_file_third_kind s2 = itkb.SelectWhere(e => e.third_kind_id == en.third_kind_id).FirstOrDefault(); config_major s3 = imb.SelectWhere(e => e.major_id == en.major_id).FirstOrDefault(); config_major_kind s4 = imkb.SelectWhere(e => e.major_kind_id == en.major_kind_id).FirstOrDefault(); //string sa= ; en.first_kind_name = s.first_kind_name; en.second_kind_name = s1.second_kind_name; en.third_kind_name = s2.third_kind_name; en.major_name = s3.major_name; en.major_kind_name = s4.major_kind_name; if (imrb.Add(en) > 0) { return(Content("<script>alert('发布成功');location.href='/Major_release/Index2'</script>")); } else { return(Content("<script>alert('发布失败');location.href='/Major_release/Index'</script>")); } }
public int config_majorDel(config_major ma, object keyValue) { return(dao.config_majorDel(ma, keyValue)); }
public int Add(config_major t) { return(dao.Add(t)); }
public bool Upd(config_major us) { return(ist.Upd(us)); }
public bool Del(config_major us) { return(ist.Del(us)); }
public int config_majorUpdate(config_major ma, object keyValue) { return(dao.config_majorUpdate(ma, keyValue)); }
public int Del(config_major t) { return(dao.Del(t)); }
public int Change(config_major t) { return(dao.Change(t)); }
public int config_majorInsert(config_major ma) { return(dao.config_majorInsert(ma)); }
/// <summary> /// 查询所有职位名称 /// </summary> /// <param name="major"></param> /// <returns></returns> public List <config_major> GetMajor(config_major major) { return(dao.GetMajor(major)); }
public bool Add(config_major us) { return(ist.Add(us)); }
public Task <int> CMDel(config_major cm) { return(ifm.CMDel(cm)); }
public config_major SelectOne(config_major us) { return(ist.SelectBy(e => e.major_id == us.major_id)[0]); }
public ActionResult major(config_major cm) { cms.Add(cm); ViewData.Model = cms.Select(); return(View()); }