//删除 public async Task <int> Delete(int id) { config_major_kind cm = await tescDbContext.cfmk.FindAsync(id); tescDbContext.cfmk.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 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 Task <int> CFKDel(config_major_kind ck) { Econfig_major_kind mk = new Econfig_major_kind() { mfk_id = ck.mfk_id }; return(Del(mk)); }
private static Econfig_major_kind GetMk(config_major_kind ck) { return(new Econfig_major_kind() { major_kind_id = ck.major_kind_id, mfk_id = ck.mfk_id, major_kind_name = ck.major_kind_name }); }
public JsonResult major_kind_delete(short id) { config_major_kind cm = new config_major_kind() { mfk_id = id }; return(Json(cmks.Del(cm))); }
public ActionResult major_kind_add(config_major_kind t) { if (bk.Add(t) > 0) { return(Content("<script>window.location.href='/client/third_kind_register_success'</script>")); } else { return(Content("<script>alert('添加失败');window.location.href='/client/major_kind_add'</script>")); } }
//添加 public async Task <int> Add(config_major_kindModel1 cmm) { config_major_kind cm = new config_major_kind() { mfk_id = cmm.mfk_id, major_kind_id = cmm.major_kind_id, major_kind_name = cmm.major_kind_name, }; tescDbContext.cfmk.Add(cm); return(await tescDbContext.SaveChangesAsync()); }
public ActionResult major_kind_add(config_major_kind cmk) { int num = cmkbll.config_major_kindInsert(cmk); if (num > 0) { return(Content("<script>alert('新增成功!!!');location.href='/client/major_kind'</script>")); } else { return(View()); } }
//删除 public async Task <ActionResult> Delete(int id) { config_major_kind cc = new config_major_kind() { mfk_id = id }; int result = await isk.CFKDel(cc); if (result > 0) { return(Content("<script>alert('删除成功');window.location.href='/config_major_kind/Index'</script>")); } else { return(Content("<script>alert('删除失败');window.location.href='/config_major_kind/Index'</script>")); } }
public async Task <List <config_major_kind> > CFKSelect() { List <Econfig_major_kind> mk = await GetAll(); List <config_major_kind> mk2 = new List <config_major_kind>(); foreach (var ck in mk) { config_major_kind ma = new config_major_kind() { major_kind_id = ck.major_kind_id, mfk_id = ck.mfk_id, major_kind_name = ck.major_kind_name }; mk2.Add(ma); } return(mk2); }
public async Task <ActionResult> Create(config_major_kind ck) { try { int result = await isk.CFKAdd(ck); if (result > 0) { return(RedirectToAction("Index")); } else { return(View(ck)); } } catch (Exception) { return(View(ck)); } }
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 bool Del(config_major_kind us) { return(ist.Del(us)); }
public int Change(config_major_kind t) { return(dao.Change(t)); }
public int Add(config_major_kind t) { return(dao.Add(t)); }
public int Del(config_major_kind t) { return(dao.Del(t)); }
public ActionResult major_kind(config_major_kind cmk) { cmks.Add(cmk); ViewData.Model = cmks.Select(); return(View()); }
public Task <int> CFKAdd(config_major_kind ck) { Econfig_major_kind mk = GetMk(ck); return(Add(mk)); }
public config_major_kind SelectOne(config_major_kind us) { return(ist.SelectBy(e => e.mfk_id == us.mfk_id)[0]); }
public Task <int> CFKDel(config_major_kind ck) { return(imk.CFKDel(ck)); }
public int config_major_kindDel(config_major_kind cmk, object keyValue) { return(dao.config_major_kindDel(cmk, keyValue)); }
public bool Upd(config_major_kind us) { return(ist.Upd(us)); }
public bool Add(config_major_kind us) { return(ist.Add(us)); }
public int config_major_kindInsert(config_major_kind cmk) { return(dao.config_major_kindInsert(cmk)); }