/*更新備用備件資訊*/ public static bool UpdateDeviceModel(BackupDeviceModel backupDevice) { string updateSql = "update [t_device_backup] set "; updateSql += "typeId=" + backupDevice.getTypeId() + ","; updateSql += "deviceName=" + SqlString.GetQuotedString(backupDevice.getDeviceName()) + ","; updateSql += "deviceModel=" + SqlString.GetQuotedString(backupDevice.getDeviceModel()) + ","; updateSql += "price=" + backupDevice.getPrice() + ","; updateSql += "deviceFrom=" + SqlString.GetQuotedString(backupDevice.getDeviceFrom()) + ","; updateSql += "manufacturer=" + SqlString.GetQuotedString(backupDevice.getManufacturer()) + ","; updateSql += "inDate=" + SqlString.GetQuotedString(backupDevice.getInDate()) + ","; updateSql += "outDate=" + SqlString.GetQuotedString(backupDevice.getOutDate()) + ","; updateSql += "stockCount=" + backupDevice.getStockCount() + ","; updateSql += "inOperator=" + SqlString.GetQuotedString(backupDevice.getInOperator()) + ","; updateSql += "outOperator=" + SqlString.GetQuotedString(backupDevice.getOutOperator()); updateSql += " where id=" + backupDevice.getId(); DataBase db = new DataBase(); if (db.InsertOrUpdate(updateSql) < 0) { return(false); } return(true); }