Пример #1
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name='model'>实体</param>
        /// <returns>bool</returns>
        public bool Update(Sys_Config_Field_Refer model)
        {
            bool result  = false;
            var  e       = new ModelExceptions();
            int  _rseult = instance.Update(model);

            if (_rseult > 0)
            {
                result = true;
            }
            return(result);
        }
Пример #2
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name='model'>实体</param>
        /// <returns>bool</returns>
        //public bool Update(Sys_Config_Field_Refer model)
        //{
        //    bool result = false;
        //    var e = new ModelExceptions();
        //    int _rseult = instance.Update(model);
        //    if (_rseult > 0)
        //    {
        //        result = true;
        //    }
        //    return result;
        //}

        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name='model'>实体</param>
        /// <returns>bool</returns>
        //public bool Update(Sys_Config_Field_Refer model,bool IsValid)
        //{

        //    bool result = false;
        //    var e = new ModelExceptions();
        //    if(e.IsValid && IsValid){
        //        int _rseult = instance.Update(model);
        //        if (_rseult > 0)
        //        {
        //            result = true;
        //        }
        //    }
        //    return result;
        //}
        /// <summary>
        /// 逻辑删除数据
        /// </summary>
        /// <param name='model'>model</param>
        /// <returns>bool</returns>
        public bool Delete(string Condition)
        {
            bool result = false;
            List <Sys_Config_Field_Refer> list = instance.GetListByWhere(Condition);

            if (list.Count > 0)
            {
                Sys_Config_Field_Refer model = list[0];
                model.Stat = 1;
                int _rseult = instance.Update(model);
                if (_rseult > 0)
                {
                    result = true;
                }
            }
            return(result);
        }