public List <threeorganizationModel> threeorganizationWhere(string id) { MyDbContext db = CreateContext(); List <threeorganization> list = db.threeorganization.AsNoTracking() .Where(e => e.twoCodeName == id) .Select(e => e) .ToList(); List <threeorganizationModel> list2 = new List <threeorganizationModel>(); foreach (threeorganization item in list) { threeorganizationModel last = new threeorganizationModel() { threeID = item.threeID, oneName = item.oneName, twoCodeName = item.twoCodeName, threeCode = item.threeCode, threeCodeName = item.threeCodeName, threeCodemarket = item.threeCodemarket, threeCodepd = item.threeCodepd }; list2.Add(last); } return(list2); }
public int threeorganizationDel(threeorganizationModel three) { threeorganization last = new threeorganization() { threeID = three.threeID }; return(Delete(last)); }
public ActionResult Deletethree(int id) { threeorganizationModel three = new threeorganizationModel() { threeID = id }; int pd = ithree.threeorganizationDel(three); return(Content(JsonConvert.SerializeObject(pd))); }
public ActionResult InsertthreeWhere(threeorganizationModel three) { if (ithree.threeorganizationUpd(three) > 0) { Response.Write("<script>alert('修改成功')</script>"); return(Selectthree()); } else { Response.Write("<script>alert('修改成功')</script>"); return(View()); } }
public int threeorganizationAdd(threeorganizationModel three) { threeorganization last = new threeorganization() { oneName = three.oneName, twoCodeName = three.twoCodeName, threeCode = three.threeCode, threeCodeName = three.threeCodeName, threeCodemarket = three.threeCodemarket, threeCodepd = three.threeCodepd }; return(Add(last)); }
public int threeorganizationUpd(threeorganizationModel three) { threeorganization last = new threeorganization() { threeID = three.threeID, oneName = three.oneName, twoCodeName = three.twoCodeName, threeCode = three.threeCode, threeCodeName = three.threeCodeName, threeCodemarket = three.threeCodemarket, threeCodepd = three.threeCodepd }; return(Update(last)); }
public ActionResult SelectWherethree(int id) { List <threeorganizationModel> list = ithree.threeorganizationSelectWhere(id); threeorganizationModel three = null; foreach (threeorganizationModel item in list) { three = new threeorganizationModel() { threeID = id, oneName = item.oneName, twoCodeName = item.twoCodeName, threeCode = item.threeCode, threeCodeName = item.threeCodeName, threeCodemarket = item.threeCodemarket, threeCodepd = item.threeCodepd }; } return(View("SelectWherethree", three)); }
public List <threeorganizationModel> threeorganizationSelect() { List <threeorganization> list = Select(); List <threeorganizationModel> list2 = new List <threeorganizationModel>(); foreach (threeorganization item in list) { threeorganizationModel last = new threeorganizationModel() { threeID = item.threeID, oneName = item.oneName, twoCodeName = item.twoCodeName, threeCode = item.threeCode, threeCodeName = item.threeCodeName, threeCodemarket = item.threeCodemarket, threeCodepd = item.threeCodepd }; list2.Add(last); } return(list2); }
public int threeorganizationUpd(threeorganizationModel three) { return(ithree.threeorganizationUpd(three)); }