//删除 public async Task <int> Delete(int id) { config_public_char cpc = await tescDbContext.publics.FindAsync(id); tescDbContext.publics.Remove(cpc); return(await tescDbContext.SaveChangesAsync()); }
private static Econfig_public_char GetCph(config_public_char pc) { return(new Econfig_public_char() { pbc_id = pc.pbc_id, attribute_name = pc.attribute_name, attribute_kind = pc.attribute_kind }); }
//删除 public Task <int> Del(config_public_char pc) { Econfig_public_char cc = new Econfig_public_char() { pbc_id = pc.pbc_id }; return(Del(cc)); }
public JsonResult public_char_delete(short id) { config_public_char cpc = new config_public_char() { pbc_id = id }; bool res = cps.Del(cpc); return(Json(res)); }
public ActionResult salary_item_register(config_public_char t) { if (cc.Add(t) > 0) { return(Content("<script>alert('添加成功');window.location.href='/client/salary_item'</script>")); } else { return(Content("<script>alert('添加失败');window.location.href='/client/salary_item_register'</script>")); } }
public ActionResult public_char_add(config_public_char t) { if (cc.Add(t) > 0) { return(Content("<script>alert('添加成功');window.location.href='/client/public_char'</script>")); } else { return(Content("<script>alert('添加失败');window.location.href='/client/public_char_add'</script>")); } }
//添加 public async Task <int> Add(config_public_charModel1 cpcm) { config_public_char cpc = new config_public_char() { pbc_id = cpcm.pbc_id, attribute_kind = cpcm.attribute_kind, attribute_name = cpcm.attribute_name }; tescDbContext.publics.Add(cpc); return(await tescDbContext.SaveChangesAsync()); }
public ActionResult public_char_add(config_public_char pc) { int num = pcbll.config_public_charInsert(pc); if (num > 0) { return(Content("<script>alert('新增成功!!!');location.href='/client/public_char'</script>")); } else { return(View(num)); } }
//条件查询 public async Task <config_public_charModel1> WhereSelect(int id) { config_public_char item = await tescDbContext.publics.FindAsync(id); config_public_charModel1 cffkm = new config_public_charModel1() { pbc_id = item.pbc_id, attribute_kind = item.attribute_kind, attribute_name = item.attribute_name }; return(cffkm); }
//公共属性设置删除 public async Task <ActionResult> DeleteSX(int id) { config_public_char cc = new config_public_char() { pbc_id = id }; int result = await imk.Del(cc); if (result > 0) { return(Content("<script>alert('删除成功');window.location.href='/config_public_char/Ggsx'</script>")); } else { return(Content("<script>alert('删除失败');window.location.href='/config_public_char/Ggsx'</script>")); } }
//职场设置页面查询 public async Task <List <config_public_char> > CMKSelect(Expression <Func <Econfig_public_char, bool> > where) { List <Econfig_public_char> mk = await GetWhere(where); List <config_public_char> mk2 = new List <config_public_char>(); foreach (var item in mk) { config_public_char ck = new config_public_char() { pbc_id = item.pbc_id, attribute_name = item.attribute_name, attribute_kind = item.attribute_kind }; mk2.Add(ck); } return(mk2); }
//公共属性查询 public async Task <List <config_public_char> > SelectSX() { List <Econfig_public_char> cp = await GetAll(); List <config_public_char> cp2 = new List <config_public_char>(); foreach (var pc in cp) { config_public_char cc = new config_public_char() { pbc_id = pc.pbc_id, attribute_name = pc.attribute_name, attribute_kind = pc.attribute_kind }; cp2.Add(cc); } return(cp2); }
//薪酬查询 public async Task <List <config_public_char> > SelectXC(Expression <Func <Econfig_public_char, bool> > where) { List <Econfig_public_char> pc = await GetWhere(where); List <config_public_char> pc2 = new List <config_public_char>(); foreach (var item in pc) { config_public_char cc = new config_public_char() { pbc_id = item.pbc_id, attribute_name = item.attribute_name, attribute_kind = item.attribute_kind }; pc2.Add(cc); } return(pc2); }
//公共属性添加 public async Task <ActionResult> Create(config_public_char pc) { try { int result = await imk.AddSX(pc); if (result > 0) { return(RedirectToAction("Ggsx")); } else { return(View(pc)); } } catch (Exception) { return(View(pc)); } }
public async Task <ActionResult> Create2(config_public_char pc) { try { pc.attribute_kind = "薪酬设置"; int result = await imk.AddXC(pc); if (result > 0) { return(RedirectToAction("XinChou")); } else { return(View(pc)); } } catch (Exception) { return(View(pc)); } }
public config_public_char SelectOne(config_public_char us) { return(ist.SelectBy(e => e.pbc_id == us.pbc_id)[0]); }
public int Change(config_public_char t) { return(dao.Change(t)); }
public int Del(config_public_char t) { return(dao.Del(t)); }
//薪酬添加 public Task <int> AddXC(config_public_char pc) { Econfig_public_char cc = GetCph(pc); return(Add(cc)); }
public int Add(config_public_char t) { return(dao.Add(t)); }
public bool Del(config_public_char us) { return(ist.Del(us)); }
public ActionResult public_char(config_public_char cpc) { cps.Add(cpc); ViewData.Model = cps.Select(); return(View()); }
public bool Add(config_public_char us) { return(ist.Add(us)); }
//公共属性添加 public Task <int> AddSX(config_public_char pc) { Econfig_public_char cph = GetCph(pc); return(Add(cph)); }
public bool Upd(config_public_char us) { return(ist.Upd(us)); }
//薪酬删除 public Task <int> Del(config_public_char pc) { return(imk.Del(pc)); }
public int config_public_charInsert(config_public_char pc) { return(dao.config_public_charInsert(pc)); }
public int config_public_charDel(config_public_char pc, object keyValue) { return(dao.config_public_charDel(pc, keyValue)); }
//薪酬添加 public Task <int> AddXC(config_public_char pc) { return(imk.AddXC(pc)); }