/// <summary> /// 编辑失信人 /// </summary> /// <param name="sxr"></param> public void Update(Sxr sxr) { if (manage.Edit(sxr) > 0) { result.success = true; } }
/// <summary> /// 添加失信人 /// </summary> /// <param name="sxr"></param> public void Insert(Sxr sxr) { if (manage.Add(sxr) > 0) { result.success = true; } }
/// <summary> /// 编辑失信人 /// </summary> /// <param name="user"></param> /// <returns></returns> public int Edit(Sxr sxr) { using (var db = new Entities()) { db.Entry <Sxr>(sxr).State = System.Data.Entity.EntityState.Modified; return(db.SaveChanges()); } }
/// <summary> /// 添加失信人 /// </summary> /// <param name="user"></param> /// <returns></returns> public int Add(Sxr sxr) { using (var db = new Entities()) { sxr.UserOrder = 0; sxr.UserState = true; db.Sxr.Add(sxr); return(db.SaveChanges()); } }