Esempio n. 1
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="creator"></param>
        /// <returns></returns>
        public int Excute(UpdateCreator creator)
        {
            if (creator.Table == null)
            {
                throw new MySoftException("用创建器操作时,表不能为null!");
            }

            if (DataUtils.IsNullOrEmpty(creator.Where))
            {
                throw new MySoftException("用更新创建器操作时,条件不能为空!");
            }

            return(Update <TempTable>(creator.Table, creator.Fields, creator.Values, creator.Where));
        }
Esempio n. 2
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="creator"></param>
        /// <returns></returns>
        public int Execute(UpdateCreator creator)
        {
            if (creator.Table == null)
            {
                throw new DataException("用创建器操作时,表不能为null!");
            }

            if (DataHelper.IsNullOrEmpty(creator.Where))
            {
                throw new DataException("用更新创建器操作时,条件不能为空!");
            }

            return(Update <ViewEntity>(creator.Table, creator.Fields, creator.Values, creator.Where));
        }
Esempio n. 3
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="creator"></param>
 /// <returns></returns>
 public int Execute(UpdateCreator creator)
 {
     return(dbTrans.Execute(creator));
 }