public void UpdateDeviceKindInfo(DeviceKindData deviceKind) { SQL sql = SqlHelper.CreateSQL("更新设备类别信息", "Update 影像设备类别 " + " Set 类别名称=:类别名称, 影像类别=:影像类别,类别信息=:类别信息 where 类别ID=:类别ID"); sql.AddParameter("类别ID", DbType.String, deviceKind.类别ID); sql.AddParameter("类别名称", DbType.String, deviceKind.类别名称); sql.AddParameter("影像类别", DbType.String, deviceKind.影像类别); sql.AddParameter("类别信息", DbType.String, deviceKind.类别信息.ToString()); _dbHelper.ExecuteSQL(sql); }
public void NewDeviceKindInfo(DeviceKindData deviceKind) { SQL sql = SqlHelper.CreateSQL("插入设备类别信息", "insert into 影像设备类别(类别ID, 类别名称, 影像类别, 类别信息)" + " values(:类别ID, :类别名称, :影像类别, :类别信息)"); sql.AddParameter("类别ID", DbType.String, deviceKind.类别ID); sql.AddParameter("类别名称", DbType.String, deviceKind.类别名称); sql.AddParameter("影像类别", DbType.String, deviceKind.影像类别); sql.AddParameter("类别信息", DbType.String, deviceKind.类别信息.ToString()); DataTable dtResult = _dbHelper.ExecuteSQL(sql); }