/// <summary> /// 添加实体 /// </summary> /// <param name="entity">实体对象</param> public bool InsertEntity(TFunExpand entity) { using (UCDbContext db = new UCDbContext()) { int rows = db.TFunExpands.Insert(entity); if (rows > 0) { return(true); } else { return(false); } } }
/// <summary> /// 修改实体 /// </summary> /// <param name="entity">实体对象</param> public bool UpadateEntity(TFunExpand entity) { using (teaCRMDBContext db = new teaCRMDBContext()) { int rows = db.TFunExpands.Update(entity); if (rows > 0) { return(true); } else { return(false); } } }
/// <summary> /// 删除实体 /// </summary> /// <param name="predicate">Lamda表达式</param> public bool DeleteEntity(Expression <Func <TFunExpand, bool> > predicate) { using (teaCRMDBContext db = new teaCRMDBContext()) { TFunExpand entity = db.TFunExpands.Where(predicate).First(); int rows = db.TFunExpands.Delete(entity); if (rows > 0) { return(true); } else { return(false); } } }
public ResponseMessage EditField([FromBody] TFunExpand field) { ResponseMessage rmsg = new ResponseMessage(); if (AppMakerService.EditField(field)) { rmsg.Status = true; } else { rmsg.Status = false; } return(rmsg); }
/// <summary> /// 修改信息 2014-11-05 20:23:33 By 唐有炜 /// </summary> /// <param name="id">id</param> /// <param name="TFunExpand">TFunExpand</param> /// <returns>添加状态</returns> public bool EditFunExpand(TFunExpand FunExpand) { var status = false; try { status = TFunExpandDao.UpdateEntity(FunExpand); } catch (Exception ex) { LogHelper.Error("获取FunExpand失败。", ex); status = false; } return(status); }
public bool EditField(TFunExpand field) { return(false); }
public bool AddField(TFunExpand field) { return(false); }