示例#1
0
        public int Update(string tableName, Hashtable ht, string propertyName, DbTransaction isOpenTrans)
        {
            object        obj2    = 0;
            StringBuilder builder = DatabaseCommon.UpdateSql(tableName, ht, propertyName);

            DbParameter[] parameter = DatabaseCommon.GetParameter(ht);
            obj2 = DbHelper.ExecuteNonQuery(isOpenTrans, CommandType.Text, builder.ToString(), parameter);
            return(Convert.ToInt32(obj2));
        }
示例#2
0
        public int Update <T>(T entity, DbTransaction isOpenTrans)
        {
            object        obj2    = 0;
            StringBuilder builder = DatabaseCommon.UpdateSql <T>(entity);

            DbParameter[] parameter = DatabaseCommon.GetParameter <T>(entity);
            obj2 = DbHelper.ExecuteNonQuery(isOpenTrans, CommandType.Text, builder.ToString(), parameter);
            return(Convert.ToInt32(obj2));
        }