Ejemplo n.º 1
0
 /// <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);
         }
     }
 }
Ejemplo n.º 2
0
 /// <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);
         }
     }
 }
Ejemplo n.º 3
0
 /// <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);
         }
     }
 }
Ejemplo n.º 4
0
        public ResponseMessage EditField([FromBody] TFunExpand field)
        {
            ResponseMessage rmsg = new ResponseMessage();

            if (AppMakerService.EditField(field))
            {
                rmsg.Status = true;
            }
            else
            {
                rmsg.Status = false;
            }


            return(rmsg);
        }
Ejemplo n.º 5
0
        /// <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);
        }
Ejemplo n.º 6
0
 public bool EditField(TFunExpand field)
 {
     return(false);
 }
Ejemplo n.º 7
0
 public bool AddField(TFunExpand field)
 {
     return(false);
 }