public int twoorganizationDel(twoorganizationModel two) { twoorganization create = new twoorganization() { twoID = two.twoID }; return(Delete(create)); }
public ActionResult Deletetwo(int id) { twoorganizationModel two = new twoorganizationModel() { twoID = id }; int pd = itwo.twoorganizationDel(two); return(Content(JsonConvert.SerializeObject(pd))); }
public int twoorganizationAdd(twoorganizationModel two) { twoorganization create = new twoorganization() { oneCodeName = two.oneCodeName, twoCode = two.twoCode, twoCodeName = two.twoCodeName, twoCoderemuneration = two.twoCoderemuneration, twoCodemarket = two.twoCodemarket }; return(Add(create)); }
public ActionResult InserttwoWhere(twoorganizationModel two) { if (itwo.twoorganizationAdd(two) > 0) { Response.Write("<script>alert('添加成功')</script>"); return(Selecttwo()); } else { Response.Write("<script>alert('添加失败')</script>"); return(View()); } }
public ActionResult Updatetwo(twoorganizationModel two) { if (itwo.twoorganizationUpd(two) > 0) { Response.Write("<script>alert('修改成功')</script>"); return(Selecttwo()); } else { Response.Write("<script>alert('修改失败')</script>"); return(View()); } }
public ActionResult SelectWheretwo(int id) { List <twoorganizationModel> list = itwo.twoorganizationSelectWhere(id); twoorganizationModel two = null; foreach (twoorganizationModel item in list) { two = new twoorganizationModel() { twoID = item.twoID, oneCodeName = item.oneCodeName, twoCode = item.twoCode, twoCodeName = item.twoCodeName, twoCoderemuneration = item.twoCoderemuneration, twoCodemarket = item.twoCodemarket }; } return(View("SelectWheretwo", two)); }
public List <twoorganizationModel> twoorganizationSelect() { List <twoorganization> list = Select(); List <twoorganizationModel> list2 = new List <twoorganizationModel>(); foreach (twoorganization item in list) { twoorganizationModel two = new twoorganizationModel() { twoID = item.twoID, oneCodeName = item.oneCodeName, twoCode = item.twoCode, twoCodeName = item.twoCodeName, twoCoderemuneration = item.twoCoderemuneration, twoCodemarket = item.twoCodemarket }; list2.Add(two); } return(list2); }
public List <twoorganizationModel> twoorganizationSelectWhereName(string id) { MyDbContext db = CreateContext(); List <twoorganization> list = db.twoorganization.AsNoTracking() .Where(e => e.oneCodeName == id) .Select(e => e) .ToList(); List <twoorganizationModel> list2 = new List <twoorganizationModel>(); foreach (twoorganization item in list) { twoorganizationModel two = new twoorganizationModel() { twoID = item.twoID, oneCodeName = item.oneCodeName, twoCode = item.twoCode, twoCodeName = item.twoCodeName, twoCoderemuneration = item.twoCoderemuneration, twoCodemarket = item.twoCodemarket }; list2.Add(two); } return(list2); }
public int twoorganizationUpd(twoorganizationModel two) { return(itwo.twoorganizationUpd(two)); }